While looking for question about speed of light I saw this Physics.SE question where I found this:
$$v_\text{rel} = \frac{v_1 - v_2}{1 - \frac{v_1v_2}{c^2}}.\tag1$$
But in another answer there was this: $$v_2^{'} = \frac{v_1+v_2}{1+\frac{v_1v_2}{c^2}}.\tag2$$ Which is very similar to $(1)$. Which is correct and what are these formulas (I know that are related to special relativity but searching online I couldn't really find them!)?