Part (i)
Dynamics in $x$-direction: $\ddot{x}=0$, $\dot{x}=V\cos\theta$, $x=Vt\cos\theta$.
Dyanmics in $y$-direction: $\ddot{y}=-10$, $\dot{y}=-10t+V\sin\theta$, $y=-5t^2+Vt\sin\theta$.
(a) Time for projectile to land on the ground: solve $y=0$ for time $t$:
\begin{eqnarray*}
-5t^2+Vt\sin\theta &=&0\\
\end{eqnarray*}
One solution is $t=0$, but that is the initial condition. So, assume $t\neq 0$ and divide by $t$ to get
\begin{eqnarray*}
-5t+V\sin\theta &=&0
\implies t = \frac{1}{5}V\sin\theta
\end{eqnarray*}
This is the time until the projectile lands for any given $\theta$ and $V$.
(b) total horizontal distance traveled before projectile hits ground: use the time until projectile hits ground found in (a) in the expression for $x$ as a function of $t$:
\begin{eqnarray*}
x &=& Vt\cos\theta
= V\Big(\frac{1}{5}V\sin\theta\Big)=\frac{1}{10}V^22\sin\theta\cos\theta = \frac{1}{10}V^2\sin 2\theta
\end{eqnarray*}
This is the horizontal distance travelled up until the projectile hits the ground for any given $\theta$ and $V$.
(c) From (b) we have $R(\theta)=\frac{1}{10}V^2\sin 2\theta$ is the horizontal range as a function of $\theta$ and $V$. The question doesn't state this clearly but they are assuming $V$ is held constant and it is asking which angle maximises the horizontal range. So, differentiate $R(\theta)$ with respect to $\theta$ and set it equal to zero to get
$$
R'(\theta)=\frac{1}{5}V^2\cos 2\theta = 0
$$
Hence, solving gives $2\theta=\frac{\pi}{2}$ and so $\theta=\frac{\pi}{4}$. The maximum range for any $V$ is therefore
$$
R\Big(\frac{\pi}{4}\Big)=\frac{1}{10}V^2\sin\Big(\frac{\pi}{2}\Big)=\frac{1}{10}V^2
$$
Part (ii)
Dynamics in $x$-direction: $\ddot{x}=0$, $\dot{x}=V\cos\theta+30$, $x=Vt\cos\theta+30t$.
Dyanmics in $y$-direction: $\ddot{y}=-10$, $\dot{y}=-10t+V\sin\theta$, $y=-5t^2+Vt\sin\theta$.
From the $x$ dynamics we see that the range is increased by $30t$ no matter what $\theta$ and $V$ are. We know the time until the projectile hits the ground and so we can work out the increase in range for any $\theta$ and $V$:
$$
30t = 30\Big(\frac{1}{5}V\sin\theta\Big)=6V\sin\theta
$$
However, we are told that the maximum range of the rifle, when stationary, is 2000 meters. This means two things (1) the rifle is being fired at an angle of $\frac{\pi}{4}$ so as to maximize range and (2) knowing the range will enable you to find $V$. When the rifle is stationary, the bullet has a maximum range of $\frac{1}{10}V^2$. Hence, we solve
$$
2000=\frac{1}{10}V^2 \implies V=100\sqrt{2}
$$
So, $\theta=\frac{\pi}{4}$ and $V=100\sqrt{2}$. This means the extra range gained by mounting rifle on car is
$$
30t = 30\Big(\frac{1}{5}V\sin\theta\Big)=6V\sin\theta = 6(100\sqrt{2})\sin\Big(\frac{\pi}{4}\Big) = 6(100\sqrt{2})\frac{1}{\sqrt{2}}=600
$$
EDIT
In part (ii), there is some vagueness in the question. It says the maximum range of the rifle is 2000m. It doesn't explicitly say so but I think one has to assume this is the maximum range when the rifle is at rest, which, from part (i), implies that the rifle is being fired at the angle $\frac{\pi}{4}$. Also, the question explicitly states "the angle of elevation being unaltered" whether stationary or moving, so I think we have to assume the angle remains at $\frac{\pi}{4}$ while moving.
However, as pointed out by ab123, one could interpret the problem slightly differently: once moving at 30m/s, one could ask what is the maximum range if one is then allowed to vary the angle. The y-dynamics don't change so we still have the time in the air given by $t=\frac{1}{5}V\sin\theta$ for any $V$ and $\theta$. Now substitute this time into the expression for $x(t)$ to get
\begin{eqnarray*}
x(t) &=& Vt\cos\theta +30 t\\
x\Big(\frac{1}{5}V\sin\theta\Big) &=&
V\Big(\frac{1}{5}V\sin\theta\Big)\cos\theta+30\Big(\frac{1}{5}V\sin\theta\Big)\\
&=&
\frac{1}{10}V^2\sin(2\theta)+6V\sin\theta
\end{eqnarray*}
Note that the extra $6V\sin\theta$ term represents the gain in range due to moving at 30m/s horizontally, and that it depends on $V$ and $\theta$. The time in the air is $t=\frac{1}{5}V\sin\theta$. Intuitively, when we increase the angle from $\frac{\pi}{4}$ to something a little higher we increase the time in the air and hence increase the time during which we can travel horizontally at 30m/s. However, there is an offsetting effect: increasing the angle reduces the x-velocity $V\cos\theta$ due to the rifle elevation. Well, it turns out that there is an optimal angle that maximizes the difference between these two offsetting velocity effects. To find this angle we take the above expression for distance travelled while in the air and maximize with respect to $\theta$, so we take the derivative:
\begin{eqnarray*}
x\Big(\frac{1}{5}V\sin\theta\Big) &=&
\frac{1}{10}V^2\sin(2\theta)+6V\sin\theta\\
\text{ so }0 &=& \frac{d}{d\theta}x\Big(\frac{1}{5}V\sin\theta\Big)=
\frac{d}{d\theta}\frac{1}{10}V^2\sin(2\theta)+6V\sin\theta\\
&=&\frac{1}{5}V^2\cos(2\theta)+6V\cos\theta\\
\end{eqnarray*}
Using $V=100\sqrt{2}$ one can numerically solve for the best angle. I get $0.855$ radians which is $48.99$ degrees, slightly higher than $45$ degrees from the above solution. Putting this angle back into the equation
$$
x\Big(\frac{1}{5}V\sin\theta\Big) =
\frac{1}{10}V^2\sin(2\theta)+6V\sin\theta
$$
one gets that the maximum range is $2620.93$, which is slightly higher than the above solution, and represents and increase of $2620.93-2000=620.93$.
When I originally thought about this problem I thought that, moving or not, the range is always maximised by firing the rifle at $\frac{\pi}{4}$. However, that initial intuition was wrong. Increasing the angle increases the time in the air and hence takes further advantage of the fact that the bullet is moving horizontally at a minimum of 30m/s, no matter what angle of elevation is being used (ignoring the possibility of shooting the rifle in the opposite direction to the direction of motion!). As mentioned, this is offset by a loss of horizontal velocity $V\cos\theta$ but there is an angle that maximizes the difference between gains and losses: 48.99 degrees.
You made a few errors in transcribing the standard formula
$$\arccos\left(\frac{x_1x_2+y_1y_2+z_1z_2}{\sqrt{x_1^2+y_1^2+z_1^2}\sqrt{x_2^2+y_2^2+z_2^2}}\right). $$
But your suspicion that it was not applicable is correct.
This is the formula for the angle between the vectors
$(x_1,y_1,z_1)$ and $(x_2,y_2,z_2)$,
that is, it tells you, if you were sitting at the point $(0,0,0)$
watching the projectile through a telescope,
how much you would need to turn the telescope in order to keep it pointed
at the projectile.
If the positions $(x_1,y_1,z_1)$ and $(x_2,y_2,z_2)$
are not too close to $(0,0,0)$ and are observed very close in time,
then naturally you will not have to turn the telescope very much in order to track the projectile.
To find the direction of travel your projectile, a more useful vector would be the vector from one observed point to the next observed point,
$$ (x_2 - x_1, y_2 - y_1, z_2 - z_1). $$
This vector is the sum of a horizontal vector $(x_2 - x_1, y_2 - y_1, 0)$
and a vertical vector $(0,0, z_2 - z_1)$.
The vector sum can be drawn graphically as a right triangle with those two vectors as the legs and the vector $(x_2 - x_1, y_2 - y_1, z_2 - z_1)$ as the hypotenuse.
The length of the hypotenuse is therefore
$$ \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2} $$
and the length of the vertical leg is $z_2 - z_1$, so by simple trigonometry
the angle from straight-up vertical is
$$ \arccos\left(\frac{z_2 - z_1}
{\sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}}\right) $$
and the angle from the horizontal is
$$ \arcsin\left(\frac{z_2 - z_1}
{\sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}}\right). $$
But since the projectile travels in a curve rather than a straight line,
the angle of this vector is only a kind of "average" angle of travel over the arc from the first point to the second point, not the actual angle at either endpoint.
Assuming a simple parabolic arc for the path of the projectile,
the angle you get from the formulas above is the exact angle of travel at the point
$$\left(\frac{x_1+x_2}{2}, \frac{y_1+y_2}{2}, \frac{z_1+z_2}{2} + \zeta\right)$$
for some $\zeta> 0,$ that is, at some point whose horizontal coordinates are midway between the two observed points, but whose vertical position is somewhere above the line connecting the two points.
How far above the line that position will be is a function of the acceleration of gravity and of how much time passed between the observations.
If you know the acceleration of gravity and the time that passed between observations then you can work backward from the angle measured in the above formulas to the angle at the point $(x_1,y_1,z_1)$.
But a simpler method for a parabolic arc is that if you want the direction of travel at a particular time $t$, don't use the position at time $t$; instead, use the positions at time $t - \delta$ and at $t + \delta$,
because then the point at which the slope of the arc matches the slope of the vector will be the point at time $t.$
For the horizontal direction, you have the right idea about looking at the points $(x_1,y_1)$ and $(x_2,y_2)$ in the $x,y$ plane.
It's also true that the slope of the line between those points is not an angle in the usual meaning of the word "angle."
In particular, I think you would want to distinguish a trajectory that passes through $(x_1,y_1)$ first and later through $(x_2,y_2)$ from a trajectory that passes through $(x_2,y_2)$ first and then $(x_1,y_1)$;
but the formula $(y_2 - y_1)/(x_2 - x_1)$ gives the same answer in both cases.
For the horizontal direction I suggest you consider the direction of the vector $(x_2 - x_1, y_2 - y_1)$ in the $x,y$ plane.
There is some discussion of the angular direction of this vector in
How do we really get the angle of a vector from the components?.
To summarize, the angle is essentially the result of the inverse tangent
(aka arc tangent) function.
Best Answer
Sometimes a picture worth more than thousand words in explanatory power.
Above picture illustrates what happens when you throw a ball towards the building.
All of these is embedded in the math you have worked out, you just need to visualize the trajectories of the ball at different throwing angles.