You have to use four vectors to properly apply lorentz transformations (since these are the objects that transform under the vector representation of the Lorentz group). Namely, the Lorentz transformation is really given by
$$ x'^\mu = \Lambda^\mu_{\ \nu} \ x^\nu $$
(I'm not going to use differential formalism at first--see edit). This is how coordinates transform component wise. If you want to know the velocity in the primed frame you take $\frac{d}{dt'}$ so that
$$ \frac{d x'^\mu}{dt'} = \frac{d}{dt'}\Lambda^\mu_{\ \nu} \ x^\nu $$
Next recall that if we take the primed observer to $\frac{dt'}{dt} = \frac{1}{\gamma(\beta)}$ for observers in standard configuration. It follows that
$$ \frac{d x'^\mu}{dt'} = \gamma(\beta)\frac{d}{dt}\Lambda^\mu_{\ \nu} \ x^\nu $$
And since the $\Lambda$ only depends on $\beta$ implicitly we can pass the time derivative through just yielding what we expected. Namely,
$$ \frac{d x'^\mu}{dt'} = \Lambda^\mu_{\ \nu} \ \gamma(\beta)\frac{d x^\nu}{dt}.$$
Edit: I will address your confusion you mentioned in the final sentence. Everytime you get confused about what the primed and unprimed coordinates just think about it like this. The primed coordinates of an event are *what you would say they were if you were $S'$ carrying your $S'$ axes with you. (Similarly for the unprimed)
Example: Take a clock at rest in $S'$ (say (s)he is wearing a watch). Between the two events &second hand strikes 1 second and second hand strikes 2 seconds. What would $\Delta t'$ be? Well, it would be $\Delta t' = t_2' - t_1' = 2 -1 = 1$ second.
What would $\Delta x'$ be? Remember, $S'$ is carrying their axes with them and don't know that they are moving. So, does the watch move in $S'$? no it's been on his or her wrist the whole time. Therefore, $\Delta x' = 0$ between the two ticks.
To address your concern about the differentials the exact same logic applies, if the time interval arbitrarily small then we write it as a differential $dt'$. (likewise for $dx').