Let $v'$ be the reflection of vector $v$ through the blue line in the figure below:

Drawing a line through the tips of the two vectors, we form
two mirror-image right triangles.
The triangle with $v$ as hypotenuse shows $v$ as the sum of two vectors,
$$v = v_{\parallel} + v_{\perp} $$
where $v_{\parallel}$ is a component parallel to the line
and $v_{\perp}$ is a component perpendicular to the line.
The vector $v_{\parallel}$ is also called the projection of $v$ onto the line.
The other triangle (with $v'$ as hypotenuse) illustrates the vector difference
$$v' = v_{\parallel} - v_{\perp}\; . $$
If we add $v$ and its reflection, we get
$$v + v' = (v_{\parallel} + v_{\perp}) + (v_{\parallel} - v_{\perp})
= 2 v_{\parallel} $$
and therefore
$$ v' = 2 v_{\parallel} - v \;. $$
The rest of the details of the formula are simply a way to compute $v_{\parallel}$:
$$ v_{\parallel} = \frac{v\cdot p}{||p||^2} \, p = \frac{v\cdot p}{p\cdot p} \, p $$
where $p$ is any non-zero vector parallel to the line
(the same as $l$ in your formula, but I find the symbol $l$ a little
too easy to confuse with other symbols).
There are many places to see this formula for the projection of
a vector derived, including
the answers to this question.
Note that we can also take
$$v - v' = (v_{\parallel} + v_{\perp}) - (v_{\parallel} - v_{\perp})
= 2 v_{\perp} $$
from which we can derive the formula
$$v' = v - 2 v_{\perp} = v - 2 (v \cdot \hat n)\, \hat n $$
where $\hat n$ is a normal vector of the line, that is,
a unit vector perpendicular to the line,
so that $v_{\perp} = (v \cdot \hat n)\, \hat n$.
This is a more general formula that works for planes and hyperplanes
(where the "direction" of the reflecting surface is not given by a single
vector parallel to the surface) as well as for lines.
For example, see this question.