Call

We need a stoichiometic equation:

$SO_2(g) + 1/2O_2(g) rarr SO_3(g)$

The equation unequivocally tells us that the reaction of $64*g$ $SO_2(g)$ with $16*g$ $O_2(g)$ gives $80*g$ $SO_3(g)$. The given masses are the molar equivalents of each gas. Again, from the stoichometric equation, sulfur was the (because excess dioxygen gas was specified); there was a given molar quantity of sulfur (as its dioxide), and thus a given molar quantity of the trioxide.