\(a,\dfrac{x^2+z^2}{y^2+z^2}=\dfrac{x^2+xy}{y^2+xy}=\dfrac{\left(x+y\right)\cdot x}{\left(x+y\right)\cdot y}=\dfrac{x}{y}\)
\(b,\dfrac{y^2-x^2}{x^2+z^2}=\dfrac{y^2-x^2}{x^2+xy}=\dfrac{\left(y+x\right)\left(y-x\right)}{x\left(x+y\right)}=\dfrac{y-x}{x}\)