A boy sits in a train moving with uniform speed on a straight track. If…