If $x$ is the width of the strip, your initial setup of $(20-2x)(30-2x)=336$ is fine.
Correction: Like you, I didn’t read closely enough. It’s the grass, not the garden, that is to have an area of $336$ square metres. If you make a sketch, you’ll see that the area of the strip of width $x$ is $$2x(30-2x)+2x(20-2x)+4x^2= 2x(50-4x)+4x^2=100x-4x^2\;,$$ and the correct equation is therefore $100x-4x^2=336$, or $4x^2-100x+336=0$.
Everything in sight is a multiple of $4$, so you can save yourself some work by dividing through by $4$ to get $x^2-25x+84=0$, exactly as you did, albeit to the wrong equation. If you don’t see the factorization $(x-21)(x-4)$, just use the quadratic formula:
$$x=\frac{25\pm\sqrt{25^2-4\cdot84}}2=\frac{25\pm17}2=21\text{ or }4\;.$$
Now it’s clear that the strip can’t be $21$ m wide, so we must have $x=4$, giving the centre plot dimensions of $(20-2\cdot4)\times(30-2\cdot4)=12\times 22$, as stated.
Suppose that our vertical axis is directed upwards. The second Newton's law tells us that $$m\ddot y=F.$$ The gravity law (again, thanks to Newton) will say in our case that $F=-mg$, which leads usto the differential equation
$$\ddot y=-g.$$
Suppose also that the initial coordinate of your bullet is $y_0$ and initial velocity is $\dot y(0)=v_0$. The total problem (this is a so-called Cauchy problem)
writes
$$\begin{cases}
\ddot y=-g\\
\dot y(0)=v_0\\
y(0)=y_0
\end{cases}$$
We can integrate the differential equation:
$$\int_0^t \ddot y(s)ds= -\int_0^t g\,ds,$$
which gives us (again, Newton's formula)
$$\dot y(t)-\dot y(0)=-gt,$$
or, in other words,
$$v(t) = \dot y(t) = v_0-gt.$$
Now we can integrate the aabove expression once again:
$$\int_0^t \dot y(s)ds =\int_0^t (v_0-gs)ds,$$which gives
$$y(t)-y(0)=v_0t - gt^2/2,$$
Therefore the displacement $D=v_0t - gt^2/2$ and the general formula of movement
$$y(t) = y_0+v_0t-gt^2/2.$$
If you still have questions, ask in comments.
Best Answer
It works because a right triangle of velocity vectors is just a right triangle of displacement vectors, all divided by the same constant time increment.