You have to take the maximal value of x to have the largest area of the square.
x- is a number so it can take values from {0,1,2,3,....8,9}
The maximal value which x can take is x=9
[tex]A=l^2 \\\\ l=3x+2 \\ x=9 \\\\ l=3*9+2 \\\\ l=27+2 \\\\ \boxed{l=29} \\\\ A=29^2 \\\\ \boxed{\boxed{A=841- maximal \ value}}[/tex]