This is easier than it looks!
Remember: [tex](a+b)^2 = a^2+2ab+b^2[/tex]
and (a+b) is given and we have one ab too much...
So:[tex]a^2+ab+b^2 = (a+b)^2 - ab = 10^2 - 16 = 84[/tex]
If we subtract ab twice more, we got the other one.
[tex]a^2-ab+b^2 = (a+b)^2 - 3ab = 10^2 - 3 \cdot 16 = 52[/tex]