The sides of a right angle triangle in ascending order of magnitude are 8cm, (x-2)cm…