Your confusion stems from a lack of knowledge of what the notation means. When we write
$$
\frac{dy}{-y+5} = dt
$$
what we mean is
$$
\frac{dy}{dt} \frac{1}{-y+5} = 1
$$
and we then integrate both sides in $t$, (recall $y=y(t)$). The reason it looks like we are integrating the left side in terms of $y$ is because of the chain rule.
The equation being separable means we can write it like
$$
f(y)dy = g(t)dt
$$
which means
$$
\frac{dy}{dt} f(y(t)) = g(t).
$$
But by the chain rule , if $F,G$ antiderivatives of $f,g$, then we have
$$
\frac{d}{dt}(F(y(t)) = f(y(t))\frac{dy}{dt}
$$
and integrating in $t$ gives
$$
F(y(t)) = G(t)+C
$$
which looks like you integrated in $y$ on the left and $t$ on the right in the sloppy notation.
As for why you can get rid of absolute values, you can't. You must consider $5-y = e^{-t+C}$ as well as $y-5 = e^{-t+C}$. This gives us
$$
y = 5-e^C e^{-t},~~ y= 5 + e^C e^{-t}
$$
as valid solutions. But note that $e^C$ is an arbitrary positive constant, and $-e^C$ is an arbitrary negative constant, so both solutions may be conglomerated into the shorter form
$$
y = 5 + ce^{-t}
$$
where $c$ is an arbitrary nonzero constant.
If the original question was given as $y' = -y+5$, that is YOU divided by $-y+5$, then you must also check that the constant solution $y=5$ works, so that $y=5+ce^{-t}$ is valid for all $c \in \mathbb{R}$. If the equation was given in the form with $-y+5$ in the denominator already, i.e. you did not introduce division by $-y+5$, then we leave the answer with $c \neq 0$ as the statement would not make sense if $y=5$.