For what $x$ the expression of the equation has the same remainder after division. For what $x$ does the expression $(50x+7)(3x+11)$ have the same remainder as $(26x − 86)x$ when divided by $111$?
$(50x+7)(3x+11) \equiv y \mod 111$
$(26x − 86)x \equiv y \mod 111$
$(50x+7)(3x+11) - (26x − 86)x \equiv 0 \mod 111 $
$124x^2+657x+77 \equiv 0 \mod 111$
$111 = 3 \times 37$
There is a system

*

*$124x^2+657x+77 \equiv 0 \mod 3$

*$124x^2+657x+77 \equiv 0 \mod 37$
First:
$(11x+12)^2\equiv 1 \mod 3$
And $x\equiv -1 \mod 3$
But I don't know how to solve the second equation and what to do next.
How to combine these two equations and get at what $x$ these expressions have the same remainder from division.

Simplifying the equation $$
(50 x+7)(3 x+11) \equiv(26 x-86) x \quad (\bmod 111)
$$
as
$$
13 x^2-9 x-34 \equiv 0 \Leftrightarrow (13 x+17)(x-2) \equiv 0 \quad (\bmod 111)
$$
We are going to investigate the equation case by case.
$$
\begin{aligned}(1)&:\left\{\begin{aligned}
13 x+17 \equiv 0 & \quad (\bmod 37) \\
x-2 \equiv 0 & \quad (\bmod 3)
\end{aligned}\right. \\\textrm{ or } (2)&:13x+7\equiv 0 \quad  \pmod {111}\\ \textrm{ or } (3)&: x-2 \equiv 0 \quad(\bmod 111)\\ \textrm{ or } \ (4) &:\left\{\begin{aligned}
13 x+7 \equiv 0& \quad (\bmod 3) \\
x-2 \equiv 0 & \quad (\bmod 37)
\end{aligned}\right.\end{aligned} 
$$
$(1)$ By the second equation, we have $x=3 k+2$ for some $k \in \mathbb{Z}\cdots (*).$
$$
\begin{array}{ll} &13(3 k+2)+17 \equiv 0 \quad (\bmod 37)\\
\Leftrightarrow & 2 k \equiv-6 \quad (\bmod 37)\\
\Leftrightarrow & k =-3+37m \text { for some }m \in Z.
\end{array}
$$
Putting back into $(*)$ yields $$
x=3(-3+37 m)+2=111 m-7\equiv 104 \quad \pmod {111}
$$

$(2)$ $$
\begin{array}{cc}
13 x+17 \equiv 0 & (\bmod 111) \\
13 x \equiv 104 & (\bmod 111) \\
x \equiv 67 & (\bmod 111)
\end{array}
$$

$(3)$
$$x\equiv 2 \quad \quad  \pmod {111}$$

$(4)$
$$\begin{aligned}\left\{\begin{array}{tt}
13 x+17 \equiv 0& \quad (\bmod 3) \\
x-2 \equiv 0 & \quad (\bmod 37)\end{array}\right.\end{aligned}
$$
By the second equation, we have $x=37h+2$ for some $h \in \mathbb{Z}\cdots (**).$
Putting it into the first equation yields
$$
\begin{gathered}
13(37 h+2)+17 \equiv 0 \quad(\bmod 3) \\
h\equiv 2 \quad(\bmod 3) \\
h=3n+2 \textrm{ for some integer } n
\end{gathered}
$$
Putting back into $(**)$ yields
$$x=37(3n+2)+2\equiv 76 \quad  \pmod {111}$$

Conclusively, the general solution to the equation is
$$x\equiv 104, 67, 2 \textrm{ or } 76 \quad \quad  \pmod {111}$$
