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.
Proof: Let $\alpha\in S'$. Then $f(\alpha) + h(\alpha) = g(\alpha) + h(\alpha)$, so $f$, $g$, and $h$ are all defined at $\alpha$. Hence, $\alpha\in\operatorname{dom}(h)$. Moreover, subtracting $h(\alpha)$ from both sides of $f(\alpha) + h(\alpha) = g(\alpha) + h(\alpha)$ shows that $f(\alpha) = g(\alpha)$, so that $\alpha\in S$. Thus, $\alpha\in S\cap\operatorname{dom}(h)$. Conversely, suppose that $\alpha\in S\cap\operatorname{dom}(h)$. Then $f(\alpha) = g(\alpha)$, because $\alpha\in S$, and $\alpha\in\operatorname{dom}(h)$; that is, $h(\alpha)$ is defined. Thus, we may add $h(\alpha)$ to both sides of $f(\alpha) = g(\alpha)$, which shows us that $ f(\alpha) + h(\alpha) = g(\alpha) + h(\alpha). $ Hence, $\alpha\in S'$.
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$.