(a+b)²=a²+2ab+b²=7²=49
(a-b)²=a²-2ab+b²=3²=9
则a²+b²=[(a+b)²+(a-b)²]÷2=(49+9)÷2=29
ab=[(a+b)²-(a-b)²]÷4=(49-9)÷4=10