Related rates nearly always depend on the chain rule, so you might want to try filling up this pattern...

... where straight continuous lines differentiate downwards (integrate up) with respect to the main variable (in this case time), and the straight dashed line similarly but with respect to the dashed balloon expression (the inner function of the composite which is subject to the chain rule).

Assuming the shore is perpendicular to the line PL, we can use basic trigonometry to express x, the distance of the beam along the shore from L, in terms of theta the angle of the beam away from the line PL...

So differentiate with respect to the inner function, and the inner function with respect to t...

Spoiler:

_________________________________________

Don't integrate - balloontegrate!

Balloon Calculus: Standard Integrals, Derivatives and Methods

Balloon Calculus Drawing with LaTeX and Asymptote!