The length, in cm, of the sides of a right angled triangle are x, (x+2)…