You can put this solution on YOUR website! For everything we know, we write an equation.
mary=y
mark=k
y=2k
y-k=24
We can do this several ways.
Since we already have one equation y=2k let's substitute 2k for y in the other
2k-k=24
k=24
y=2k
y=48
mary is 48 and mark is 24.