What will be the formula for range of the projectile if it is launched from the ground level but lands at some height about the ground? I have searched everywhere for the answer, but everyone has discussed the case of "launching from some height" but not "landing at some height". The picture of the scenario is attached below.

As usual, $$ x(t) = u\cos \theta t \\ y(t) = u\sin\theta t - \frac 12 gt^2 $$ Say the projectile lands a distance $f$ above the ground. Now, $$y (t) = f \\ \iff gt^2 -2u\sin\theta t +2f =0 \\ $$ The larger root of this quadratic is $$\frac{2u\sin\theta + \sqrt{4u^2\sin^2 \theta -8gf}}{2g}=\tau $$ Then, the range required will be the value of $x$ at this time, i.e. $$x(\tau) = \frac{u^2 \sin2\theta + u\cos\theta\sqrt{4u^2\sin^2\theta -8gf}}{2g}$$