The sides forming the right angles and hypotenuse of a right angled triangle are xcm, (3x-2)cm and (2x+2)cm respectively. Calculate the length of the sides of the triangle.