Let $x$ be a real number and $f$, $g$, and $h$ be functions of $x$. When do the equations $f(x)=g(x)$ and $f(x)+h(x)=g(x)+h(x)$ have the same solution sets? (i.e. when are they equivalent?)
Consider $x^2+\log(1-x)=4+\log(1-x)$. Solving this algebraically yields $x= \pm 2$. But graphically, we only get the solution $x=-2$ since the equation is not defined for $x \ge 1$.
In this case, $f=x^2$, $g=4$, and $h=\log(1-x)$. Generally, what conditions must be met so that $f(x)=g(x)$ and $f(x)+h(x)=g(x)+h(x)$ have the same solution sets?
Let $S = \{\alpha\in\Bbb R\mid f(\alpha) = g(\alpha)\}$ be the solution set of $f(x) = g(x)$, and let $S'$ be the solution set of $f(x) + h(x) = g(x) + h(x)$. I claim that $$ S' = S\cap\operatorname{dom}(h). $$ In words, the solution set of $f(x) + h(x) = g(x) + h(x)$ is the set of points where 1. $f(x) = g(x)$ and 2. $h$ is defined (alternatively, it is the solution set of $f(x) = g(x)$ minus the points where $h$ is not defined). The proof is hidden behind the spoiler box.
This shows us that $S = S'$ if and only if $S\subseteq\operatorname{dom}(h)$. That is, the solution sets are the same precisely when $h$ is defined on all elements of $S$.