There was a car accident. The first car was going 50 mph before the accident occurred, and the second car was going 60 mph. When the cars were at this speed, they were 40 feet away from each other. They were accelerating 2 mph per foot. How fast were they going at impact?

at impact? zero

is this a trick question?
Now just before impact,
relative velocity=11omph, changing mph to f/s

time=distance/relativeveloc=40ft/(110mph*88f/s/60 mph)
= 40*60/110*88 seconds.

Now, figure the just before collision velocity of each using this time.