Let , current age of Juan and Mary is x and y respectively.
Currently :
x = y + 6 ......( 1 )
Six years ago :
( x - 6 ) = 2( y - 6 )
x - 6 = 2y - 12
x = 2y - 6 ......( 2 )
Solving equation 1 and 2 :
y + 6 = 2y - 6
y = 12
x = 12 + 6 = 18
Therefore, the age of Juan and Mary is 18 and 12 respectively.
Hence, this is the required solution.