Let the times be x minutes past 7 and y minutes past 10.
For ease of calculation let's represent angular positions on the face of the clock as hour-equivalents.
At the earlier time, the hour hand is on 7 + x/60 and the minute hand is on x/5.
At the later time, the hour hand is on 10 + y/60 and the minute hand on y/5.
From the puzzle,
7 + x/60 = y/5
10 + y/60 = x/5
(420 + x) / 60 = y/5
60y = 2100 + 5x
12y = 420 + x
x = 12y - 420
Substituting in the 12x = 600 + y derived from the other equation:
144y - 5040 = 600 + y
143y = 5640
y = 5640/143
It follows that x = 7620/143
To the nearest second, the times are 7:53:17 and 10:39:26.