Let the longer side(not hypotenus) be 8x,and the shortest side as 6x.
c²=a²+b²
(140)²=(6x)² + (8x)²
19600=36x²+64x²
19600=100x²
196=x²
x=14 or x=-14(rejected)
Now we substitute the positive value of x back to 6x and 8x as the length/value of triangle cannot be negative.
6x=6(14)=84cm
8x=8(14)=112cm