I need help with this problem and I need to show my work. Can anyone help me?

A vertical angle of -40 is recorded between A and B. The slope distance, after meteorological corrections, is 806.388 m. What is the horizontal distance between A and B?

The theodolite measures 0° when the telescope is horizontal, and 90° when it is vertically upwards. So -40° is 40° below the horizontal.

The sloping distance is 806.388, so the horizontal distance is 806.388*cos(40°)=617.729