If a + b = 10 and ab = 16, find the value of a2−ab+b2 and a2+ab+b2.
If a+b+c=7 and ab+bc+ca=20 find the value of a2+b2+c2