The side of one square exceeds that of another by 3 inches. Its area exceeds twice the area of other by 17 square inches. Find the lengths of their sides.

I used this formula:

(x + 3) squared = 2x squared + 17 squared

I got

x squared + 6x + 9 = 2x squared + 289

2x squared -x squared -6x -9 + 289 = 0

I got

x squared -6x + 280

Factored

( 14-x ) ( 20 + x)

I got 14 and 17 for the 2 sides, but when I squared 14 and multiplied by 2 I didn't get the same answer as 17 squared + 17 squared. (That's what I thought was 17 square inches.) Did I do it right?