johnbean wrote:...I need the theta value in terms of h and l.....

For clarity, I will use upper-case "L" for the "length" of the longer side of the original (largest) right triangle.
If the remaining portion of the original triangle's hypotenuse is labeled as "x", then the hypotenuse has length x + h. The remaining angle may be labelled

. It is elementary to prove that one then has three right triangles:
largest: angle

contained by sides L and x + h
middle: angle

contained by sides L and x
smallest: angle

contained by sides
^2\, -\, L})
and

From the largest and middle triangles, one may arrive at two expressions for the cosine of

which may be used to create an equation. Solve this "quadratic" for the "value" of x in terms of L and h by applying the Quadratic Formula.