Lets assume present ages as below:
Me: M
Son: S
5 years ago, I was 3 times as old as my son
M-5 = 3(S-5)
M-5=3S-15
M-3S=-10...........1
5 years hence, I will be twice as old as him,
M+5=2(S+5)
M+5=2S+10
M-2S=5.............2
equation 2-1
(M-2S) - (M-3S) = 5 - (-10)
S=15
If S=15, M=35
hope this helps