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.
 A: 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}$$
A: Hint: The remainder theorem states that the remainder after dividing a polynomial $f(x)$ by the linear factor $x-a$ is $f(a)$.
We have
$$
f(x) = (50x + 7)(3x+11), \\
g(x) = (26x - 86)x
$$
Dividing both by $(x-a)$, the remainders
$$
f(a) = (50a + 7)(3a + 11), \\
g(a) = (26a - 86)a
$$
The remainders are equal as given in the problem when $x - a = 111$.
Equating,
$$
\begin{align}
f(a) & = g(a) \\
\implies (50a + 7)(3a + 11) & = (26a - 86)a \\
\implies 124 a^2 + 657 a + 77 & = 0 \tag 1
\end{align}
$$
Can you solve this quadratic to get $a$?
Then we set $x - a = 111$ and solve for $x$.
(Or)
you could substitute $a = x - 111$ in Eqn. (1) and solve directly for $x$.
A: First you have $x= 3y\pm 1$ for some integer $y$.
You can reduce the coeficents mod $37$ so \begin{align}-20x^2+30x+40 &=_{37} -5(4x^2-6x-8)\\
&=_{37} -5(4x^2+68x-8) \\&=_{37}-5 (4x^2+68x +289)+5\\
&=_{37}-5 (2x+17)^2+5\\
\end{align}
So $$(2x-20)^2 =_{37} 1 \implies 2x-20 =_{37}\pm1 $$
So you have 4 possibilites.

*

*First $x=3y+1$ and $2x-20 =_{37} 1$ and thus $ 6y =_{37} 19$ so $$y =_{37}-6\cdot 19 =_{37}-3$$ and finaly $y= 37t-3$ for some integer $t$ which gives $$x=111t-8$$ in first case.

