Note: the answer posted before which is now deleted was in error.
Here is the correct solution:
Let x be the number of years in the past the first time.
Let y be the number of years in the future the second time.
Let z be the number of years in the past the third time.
A+B=48
A = 2(B-x)
A-x = (1/2)(B+y)
B+y = 3(A-z)
A-z = 3(B-z)
Those equations simplified and arranged in columns of like terms
A + B = 48
A - 2B + 2x = 0
2A - B - 2x - y = 0
-3A + B + y + 3z = 0
A - 3B + 2z = 0
The solution by the augmented matrix method is
A=30, B=18, C=3, D=36, E=12.
Edwin