So first find the distance from the bottom of the lumber to the wood
40^2= 36^2+X^2
X=304^1/2. Or the sqaure root of 304
The you use the sin equation
Sin90*\40= sin(unknown angle)/304^1/2
Sinx(x) = ((304^1/2)xsin(90))/40
X=arcsin((304^1/2)xsin(90))/40