The problem is about the equation $|mx+m+2|=x+3$. I have to solve this equation but I don't know how to do it. The teacher gave us the solution. Let $S$ be the set of solutions for $x$:
if $m \in (-\infty , -1) \cup (1, +\infty)$, then $S=\{-1, -((m+5)/(m+1))\}$
if $m \in [-1 , 1)$, then $S=\{-1\}$
if $m \in \{1\}$, then $S=[-3,+\infty)$.
I don't even know where to begin nor how to continue. Sorry to bother you all, have a nice evening. Oh, and I'm new over here so sorry if my formatting isn't what it should be, did my best.
First of all, as you observed, it must be $x\geq -3$. In this hypothesis, the given equation is equivalent to that obtained by squaring, that is:
$$ |mx+m+2|^2 = (x+3)^2 $$
or, calculating and simplifying:
$$ (m-1)(m+1)x^2 + 2(m-1)(m+3)x + (m-1)(m+5) = 0. $$
$$ (m+1)x^2 + 2(m+3)x + m+5 = 0. $$
Two cases:
that is $x = -1 \hskip2ex \text{or} \hskip2ex x = \displaystyle -\frac{m+5}{m+1}.\hskip1ex$ Now, we just have to see when the last solution is acceptable, i.e. when
$$ -\frac{m+5}{m+1} \geq -3. $$
This inequality is equivalent to the union of the following two systems:
$$ \left\{ \begin{array}{c} m+5 \leq 3(m+1) \\ m+1 > 0 \end{array} \right. \hskip4ex \text{and} \hskip4ex \left\{ \begin{array}{c} m+5 \geq 3(m+1) \\ m+1 < 0 \end{array} \right. $$
whose solutions are respectively $m\geq 1$ and $m\leq -1$. Remembering that currently is $m\neq 1$ and $m\neq -1$, we obtain that both solutions of the quadratic equation above are acceptable if and only if $m\in [-\infty,-1[\,\cup\,]1,+\infty[$. Otherwise, that is in the interval $]-1,1[$, only $x=-1$ is acceptable.
You can immediately see that the teacher's solution is thus obtained.