This is trigonometry, correct?
So, since there is a known angle and a known side, you can use either sine, cosine, or tangent to figure out x. In this case, you would use tangent because 8,000 is opposite of 40 and x is adjacent to 40.
Now you have to solve for x:
tan(40) = 8,000/x
So by multiplying and dividing, you get that x = 9534.029