If you want not to be confused, always define events in spacetime and deal with them. First of all, let's analyze your problem by math, then we can give it physical intuition as well. Here there are 2 observers, one has stayed in x, let's call it frame X, and the other is moving via spaceship, this is frame S. There are 2 events in spacetime, the first one happens when spaceship starts its departure, and the second one is when spaceship arrives at y.
For the first event, according to frame X we have: $E_1=(ct_1,r)=(0,0)$.
And as for second event: $E_2=(ct_2,L)$ where $t_2=800$ and $L$ is the distance between x and y, according to the problem.
Now in frame S for the first event we will have: $E'_1=(0,0)$ this goes without saying, because X and S are at the same location at that moment, and they can prepare their clocks such that $t_1=t'_1=0$ . Of course, using Lorentz transformations is fine too.
For second event however, we have to use Lorentz transformations. $t'=\gamma(t-vr/c^2)$ and $r'=\gamma(r-vt)$ this leaves us with: $E'_2=(c\gamma(t_2-vL/c^2),\gamma(L-vt_2))$ but we already know that $vt_2=L$ because $t_2$ is the time of spaceship's arrival in y. So $E'_2=(c\gamma(t_2-v^2t_2/c^2),0)$. This makes sense, because spaceship and second event are in the same location at that moment. Now back to the problem, from above $t'_2=t_2\gamma(1-v^2/c^2)$ and by simplifying it we would have $t'_2=t_2/\gamma$ which as you said implies that $t'_2<t_2$ (Just choose $\gamma=2$ and we have $t'_2=400$)What if we use inverse Lorentz transformation, to see that whether still $t'_2<t_2$ is true?
$t=\gamma(t'+vr'/c^2)$, and from $E'_2$ we know that $r'_2=0$ so $t=\gamma(t_2/\gamma+0)=t_2$! It means $t_2=800$ nevertheless. What is that supposed to mean? According to S, X is the moving observer, why the measured time in X is not less than 400?! Well you see X has stayed in x, that means while event $E_2$ is happening at y, X won't observer it immediately, there is distance $L$ between him and that event after all! You see time interval is not only depend on the relative speed between observers, it's also related to position of events. On the other hand, S and $E'2$ are at the same location, Of course this observer will see this event right away. Hence the measured time interval between these two events at S has to be less than X. If you look closely to the math itself, it's because of $r_2=L$ that makes $t'=t_2/\gamma$ in the end. I don't know whether i answered your question clear enough, but i gave you an upvote because your question is good.