By cosine formula, we have
$$L^2+r^2-2(L)(r)\cos(\pi-\phi)=(r+h)^2$$
Solving, we have
$$L=-r\cos\phi+\sqrt{2rh+h^2+r^2\cos^2\phi}$$
By cosine formula, we have
$$L^2+r^2-2(L)(r)\cos(\pi-\phi)=(r+h)^2$$
Solving, we have
$$L=-r\cos\phi+\sqrt{2rh+h^2+r^2\cos^2\phi}$$