Let the base of the right triangle =x cm
Therefore, altitude of the triangle =(x-7) cm
Now, by Pythagoras theorem, we have
In `DeltaABC" "AC^(2)=AB^(2)+BC^(2)`
`implies13^(2)=x^(2)+(x-7)^(2)`
`implies169=x^(2)+x^(2)+49-14x`
`implies2x^(2)-14x-120=0`
`impliesx^(2)-7x-60=0`
`impliesx^(2)-(12-5)x-60=0`
`impliesx^(2)-12x+5x-60=0`
`impliesx(x-12)+5(x-12)=0`
`implies(x-12)(x+5)=0`
Now, `x-12=0impliesx=12`
and `x+5=0impliesx=-5`
Therefore, `x=12" "(because"side of a triangle cannot be negative")` `{:("Hence,base of triagle", =12cm),("and altitude of triangle",=12-7=5cm):}}`