Let the base of the right triangle be x cm.
Its altitude = (x−7) cm
From Pythagoras theorem, we have
Base2+Altitude2=Hypotenuse2
∴x2+(x−7)2=132
⇒x2+x2+49−14x=169
⇒2x2−14x−120=0
⇒x2−7x−60=0
⇒x2−12x+5x−60=0
⇒x(x−12)+5(x−12)=0
⇒(x−12)(x+5)=0
Either x−12=0orx+5=0,
⇒x=12 or x=−5
Since sides are positive, x can only be 12.
Therefore, the base of the given triangle is 12 cm and the altitude of this triangle will be (12−7) cm=5 cm.