A tennis ball is released from a height of hcm, it rebounds one-third of the distance it has fallen after each fall.

Find the total distance travelled when it strikes the ground
(i) the third time
(ii) the nth time

for our purposes, consider h=1. The round trip on each bounce is 2 times the height achieved. So, the total distance traveled is

1 + 2/3 + 2/9 + 2/27 + ...
with sums adding up to
1, 5/3, 17/9, 53/27

The round trip distance after the nth bounce is thus 2/3^n

The total distance traveled is thus

3(1-1/(3^n+1)) - 1 = (2*3^n - 1)/3^n

Check:
n=0: 1
n=1: 5/3
n=2: 17/9
n=3: 53/27