The cars are initially at a distance of 10 km from each other. One of them starts to move towards the right in a direction perpendicular to the line joining the cars initially. As the speed of the car is 40 km/h after 2 hours it has moved a distance of 80 km.
Now the distance between the two cars can be calculated using the Pythagorean Theorem. The two perpendicular sides are of a length 10 km and 80 km. The distance separating the cars is given by sqrt(10^2 + 80^2)
=> sqrt (100 + 6400)
=> sqrt (6500)
=> 10* sqrt 65
The distance between the cars after 2 hours is 10*sqrt 65 km.
We will calculate the distance between the first car and the starting point.
Let the car begins at A and move perpendicularly to B.
The speed if 40 km/h
Then the distance after 2 hours is : D = Speed * Time = 40*2 = 80 km
Then the distance between A and B is 80.
Now we will assume that the other car is at C.
We know that the length of AC is the initial distance between the cars which is 10 km
==> Then AC = 10.
Now we have a right angle triangle ABC such that:
AB = 80
AC = 10
We nee to find the distance between both cars after 2 hours which is the length of the line BC.
==> BC^2 = AB^2 + AC^2 = 10^2 + 80^2 = 6500
==> BC = sqrt6500 = 80.62 km ( approx.)
Then the distance between the cars after 2 hours is 80.62 km.