\(\text{a) }x^2+1-\dfrac{x^4-3x^2+2}{x^2-1}\\ =x^2+1-\dfrac{x^4-2x^2-x^2+2}{x^2-1}\\ =x^2+1-\dfrac{\left(x^4-2x^2\right)-\left(x^2+2\right)}{x^2-1}\\ =x^2+1-\dfrac{x^2\left(x^2-2\right)-\left(x^2+2\right)}{x^2-1}\\ =x^2+1-\dfrac{\left(x^2-1\right)\left(x^2+2\right)}{x^2-1}\\ =x^2+1-\left(x^2+2\right)\\ =-1\)
\(\text{b) }\dfrac{xy}{x^2-y^2}-\dfrac{x^2}{y^2-x^2}\\ =\dfrac{xy}{x^2-y^2}+\dfrac{x^2}{x^2-y^2}\\ =\dfrac{xy+x^2}{x^2-y^2}\\ =\dfrac{x\left(y+x\right)}{\left(x+y\right)\left(x-y\right)}\\ =\dfrac{x}{x-y}\)