john’s age + peter’s age = 59 (ten years ago)
p represents peter’s age in this equation
(p + 3) + p = 59
2p + 3 = 59
2p = 56
p = 28
peter was 28, so john was 31.
(28 + 3 = 31)
that was 10 year’s ago, so now we find how old john is today.
31 + 10 = 41
john is 41.