A.
8 + 12 = 20
20 / 4 = 5
5 * 5 = 25
25 - 8 = 17
I added 8 years after and 12 years before (which sums uo to 20) to find out how many years it take for him to be five times his age. I divided 20 by 4 (which equated to 5) as 20 is 4/5 of his age 8 years after. And since 20 is 4/5 of his age 8 years after, the other 1/5 is 5. 25 is his age 8 years after. Subtract 8 then you get his present age now which is 17.
B. (This is the "formal" solution teachers accept)
a = his present age
a = 5((12 + 8)/4) - 8
a = 5(20/4) - 8
a = 25 - 8
a = 17