First, assume Alex is X years old and that Emma is Y years old.
Since Alex is 6 years older than Emma, it means X - 6 = Y.
Since the sum of their ages is 32, it means X + Y = 32.
Substitute the Y in the second equation with X - 6 to get X + (X-6) = 32. This is simplified to 2X - 6 = 32 or 2X = 38. Solving the equation for X gets that X = 19.
This means Alex is 19.