Let the function lac $(x)$ defined on the set of real numbers have the following assignment rule:

$$
\operatorname{lac}(x)= \begin{cases}x, & \text { if } x \in[2 n ; 2 n+1], \text { where } n \in \mathbb{Z} \\ -x+4 n+3, & \text { if } x \in] 2 n+1 ; 2 n+2[, \quad \text { where } n \in \mathbb{Z}\end{cases}
$$

Solve the equation lac $\left(2 x^{2}+x+4\right)=\operatorname{lac}\left(x^{2}+7 x-1\right)$ on the set of real numbers.