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