Start with the identites:

(A+B)^2 = (A^2+B^2) + 2(A*B)

(A+B)^3 = (A^3+B^3) + 3*(A+B)*(A*B)

Rearrange the first as:

A*B = [(A+B)^2 - (A^2+B^2)]/2

Substitute into the second:

(A+B)^3 = (A^3+B^3) + 3*(A+B)*[(A+B)^2 - (A^2+B^2)]/2

Let A+B=S for convenience and plug in the given values to get:

S^3 = 10 + 3*S*[S^2 - 7]/2

S^3 = 10 + (3/2)*S^3 - (21/2)*S

0 = S^3 - 21S + 20

S = 4, 1, or -5

Then the maximum value of A+B is 4