Two objects coming towards each and then one goes back. How to find the number of trips I saw a question in physics

A car is moving at a constant speed of 40 km/h along a straight road which heads towards a large vertical wall and makes a sharp 90 turn by the side of the wall. A
fly flying at a constant speed of 100 km/h, starts from the wall towards the car at an instant when the car is 20 km away, flies until it reaches the glasspane of the car and return to the wall at the same speed. It continues to fly between the car and the wall till the car makes the 90 degrees turn.
How many trips has it made between the car and the wall?

Solution

Suppose the car is at a distance x away when the fly is at the wall. The time taken by the fly to reach the car is x/(100+40) = x/140. The distance travelled by fly during that time is 100x/140 = 5x/7. Now the fly goes back to the wall which will take 5x/700 = x/140 hours time. By that time,the car travels 40x/140 = 2x/7 km.(3x/7 Km from the wall).
When the 2nd trip of fly towards the car starts, it is at 3x/7 Km from the car.
Now the book says

distance of car at start of 1st trip = $$20$$
distance of car at start of 2nd trip = $$(3/7)×20$$
distance of car at start of 3rd trip = $$(3/7)^2 × 20$$
distance of car at start of 3rd trip = $$(3/7)^3×20$$
Distance of car at start of $$n^{th} trip$$ = $$(3/7)^{n-1}$$
Trips will go on till the distance becomes 0, which will happen when n becomes infinity.
I can't understand understand how can we say about the pattern between the trip number and distance between them?
(PS: The solution I wrote doesn't have the exact words used in the book)
I will be grateful if you could help.
Thank you

The car is going at 40 km/h and is at 20 km from the wall. So it will run for 30 minutes before reaching it. The fly is going at constant 100 km/h so it will cover 50 km in 30 minutes, regardless of which direction it goes. Simpler way to solve for the total distance covered by the fly.
