You can
put this solution on YOUR website! .
First equation is
D - M = 6 (1)
Since in 5 years the sum of their ages will be 58, the sum of their current ages now is 58 - 2*5 = 48.
So, your second equation is
D + M = 48.
Now add equations (1) and (2). You will get
2D = 6 + 48 = 54 ====> D = 54/2 = 27.
Hence, M = 48 - 27 = 21.
Answer. D is 27 years old; M is 21 years old.