$\left\{\begin{matrix}h=\frac{g}{x^{2}+1}\text{, }&x\neq -i\text{ and }x\neq i\\h\in \mathrm{C}\text{, }&\left(x=i\text{ or }x=-i\right)\text{ and }g=0\end{matrix}\right.$
Steps for Solving Linear Equation
Use the distributive property to multiply $h$ by $1+x^{2}$.
$$g=h+hx^{2}$$
Swap sides so that all variable terms are on the left hand side.