Greetings from Brasil...
Let M be the age of Mario and L the age of Luigi. According to the statement we can elaborate the following equations:
M = L + 12
(M + 6) + (L + 6) = 32
As M = L + 12, we will substitute in the second equation
(M + 6) + (L + 6) = 32
((L + 12) + 6) + (L + 6) = 32
2L + 24 = 32
2L = 32 - 24
2L = 8
L = 8/2
for M:
M = L + 12
M = 4 + 12