Suppose the trains meet at point "A" after time "t".

Let the trains be Train1 and Train2. Suppose Train1 travels a distance "x" in time "t" and Train2 travels a distance "y" in the same time "t". Since the two trains are travelling in opposite directions, the total distance each must travel is x + y.

Train1 has traveled "x" distance, so it has to travel "y" distance to complete the journey. It does this in 1 hour. If its speed is S1, then S1 = x/t. Also S1 = y/1 (because it travels "y" distance in 1 hour). So, x/t = y. So, t = x/y.

Train2 has traveled "y" distance, so it has to travel "x" distance to complete its journey. It travels this distance in 4 hours. If its speed is S2, then S2 = y/t, and, also, S2 = x/4. So, y/t = x/4. So, t = 4y/x.

So, x/y = 4y/x. So, x2 = 4y2.

So, x = 2y. Now, "x" and "y" are distances, so they have to be positive and can't be negative.

Consider the speeds of the trains: S1 = y and S2 = x/4. So, S1 = y and S2 = 2y/4; thus, S2 = y/2. Therefore, S2 = S1/2. This means the speed of Train2 is half the speed of Train1. I hope I got it right.

Some useful links for
your career:

  • Union Public Service Commission -
  • IIT-Kharagpur -
  • Indian Statistical Institute -
  • Indian Institute of Technology Madras -
  • Indian Institute of Management, Ahmedabad -
  • Indian Institute of Mass Commission -
  • IIT Bombay -
  • Indian School of Mines, Dhanbad -
  • Birla Institute of Technology, Ranchi -
  • Central Institute of Fisheries Nautical and Engineering Training -
  • Indian Institute of Information Technology, Allahabad (Deemed University) -
  • Central Marine Fisheries Research Institute, Kochi -
  • Tata Institute of Social Sciences, Mumbai -