first, you have that sin(40)=x/8, the leg opposite and the hypotenuse. the your x is 5.142300877. To find the other leg, you do tan(40) =x/5.142300877, which is the same thing as x= 5.14230087/tan(40). your x will be 6.128355545. the only thing to do is add up the sides, and you get 19.270656422]