3.
\(\left(a-\dfrac{a^2+b^2}{a+b}\right)\left(\dfrac{1}{b}+\dfrac{2}{a-b}\right)\)
\(=\left(\dfrac{a^2+ab}{a+b}-\dfrac{a^2+b^2}{a+b}\right)\left(\dfrac{a-b}{ab-b^2}+\dfrac{2b}{ab-b^2}\right)\)
\(=\dfrac{ab+b^2}{a+b}.\dfrac{a+b}{ab-b^2}\)
\(=\dfrac{a+b}{a-b}\)
4.
\(\dfrac{2}{ab}:\left(\dfrac{1}{a}-\dfrac{1}{b}\right)^2-\dfrac{a^2+b^2}{\left(a-b\right)^2}\)
\(=\dfrac{2}{ab}:\dfrac{\left(a-b\right)^2}{a^2b^2}-\dfrac{a^2+b^2}{\left(a-b\right)^2}\)
\(=\dfrac{2}{ab}.\dfrac{a^2b^2}{\left(a-b\right)^2}-\dfrac{a^2+b^2}{\left(a-b\right)^2}\)
\(=\dfrac{2ab}{\left(a-b\right)^2}-\dfrac{a^2+b^2}{\left(a-b\right)^2}\)
\(=-\dfrac{\left(a-b\right)^2}{\left(a-b\right)^2}=-1\)