In a right angled traingle
hypotenuse^2 = base^2 + altitude^2
so here,
(2x+2)^2 =x^2 + (3x-2)^2
We know that (a+b)^2 = a^2 +2ab +b^2 and (a-b)^2 = a^2 -2ab +b^2.
Therefore,
4x^2 + 2*2x*2 + 4 = x^2 + 9x^2 -2*3x*2 +4
4x^2 +8x +4 =x^2+9x^2-12x +4
On solving it we get,
10x^2-4x^2 -12x -8x +4-4 =0
6x^2-20x=0
x(6x-20) =0
Therefore x=0 and x =20/6 i .e x=10/3
x can't be 0 therefore x=10/3
Therefore sides are x =2/3, 3x-2 = (3*10)/3 -2 =8
, 2x+2 = (2*10)/3 +2=(20/3)+2
=(20+6)/3 =26/3.