Set up a system of equations describing the following word problem. Be sure to specify what each variable represents.
Tom and Jerry drove 270 total miles in 5 hours. Tom always drives 40 mph and Jerry always drives 60 mph. It's a wonder they can manage to remain friends. How many hours did Tom drive and how many hours did Jerry drive?