Dan is 4 years older than his brother Gabriel
d=g+4.........(1)
Sum of their ages = 22
d+g=22........(2)
Substitute the value of g from (1) to (2)
g+4+g=22
2g+4=22
2g=22-4
2g=18
2g/2=18/2
g=9
Put the value of g in (1)
d=g+4
d=9+4
d=13
Dan is 13 years old now
Gabriel is 9 years old now