Now A sends signal to B, B reflects the signal, then A reflects the signal, B gets the signal. 30 seconds pass
A=50...........B=40
(B sent signal when B=10, A got the signal when A=50, difference = 40)

Now B sends signal to A, A reflects the signal, then B reflects the signal, A gets the signal. 30 seconds pass
A=80...........B=70
(B sent signal when B=40, A got the signal at A=80, difference = 40)

Now A sends signal to B, B reflects the signal, then A reflects the signal, B gets the signal. 30 seconds pass
A=50...........B=40
(B sent signal when B=10, A got the signal when A=50, difference = 40)

B didn't send the signal, A did. So this last line should be
(A sent signal when A=20, B got the signal when B=40, difference = 20)