<s>[INST] Solve the equation $(m^2-m-2)x=m^2+4m+3$ Here's how I solve it
I think that m is the variable (am I right?).
Then
$$m^2x-mx-2x-m^2-4m-3=0$$
$$m^2(x-1)-m(x+4)-(2x+3)=0$$
$$D=x^2+8x+16+4(x-1)(2x+3)$$
 $$=x^2+8x+16+4(2x^2-2x+3x-3)$$
 $$=9x^2+12x+4$$
 $$=(3x+2)^2$$
$$m=\frac{x+4\pm (3x-2))}{2(x-1)}$$
$$m_1=\frac{4x+2}{2x-2}$$
$$m_2=\frac{-2x+6}{2x-2}$$
Is this right?
I don't know if the tag is right, so please don't be based on it.
 [/INST] Assuming you want to solve for $m$, the equation can immediately be rewritten as:
$(m-2)(m+1)x = (m+3)(m+1)$
Now it should be obvious that $m=-1$ is a solution as both LHS and RHS become zero (and equal) for this value of $m$.
Now consider the case $m \neq -1$. It is now permissible to divide both sides by $m+1$, simplifying the algebra.
$$(m-2)x = m+3 \implies mx - 2x = m+3 \implies m(x-1) = 2x + 3 \implies m = \frac{2x+3}{x-1}$$
and it should be clear that $x \neq 1$ for this solution to be valid.
Hence your solution set is:
$m=-1$ or $\displaystyle m = \frac{2x+3}{x-1}, (x \neq 1)$
</s>