To add or subtract expressions, expand them to make their denominators the same. Least common multiple of $2\left(a+1\right)$ and $4\left(a-1\right)$ is $4\left(a-1\right)\left(a+1\right)$. Multiply $\frac{3}{2\left(a+1\right)}$ times $\frac{2\left(a-1\right)}{2\left(a-1\right)}$. Multiply $\frac{1}{4\left(a-1\right)}$ times $\frac{a+1}{a+1}$.
Since $\frac{3\times 2\left(a-1\right)}{4\left(a-1\right)\left(a+1\right)}$ and $\frac{a+1}{4\left(a-1\right)\left(a+1\right)}$ have the same denominator, subtract them by subtracting their numerators.
To add or subtract expressions, expand them to make their denominators the same. Least common multiple of $4\left(a-1\right)\left(a+1\right)$ and $8\left(a^{2}+1\right)$ is $8\left(a-1\right)\left(a+1\right)\left(a^{2}+1\right)$. Multiply $\frac{5a-7}{4\left(a-1\right)\left(a+1\right)}$ times $\frac{2\left(a^{2}+1\right)}{2\left(a^{2}+1\right)}$. Multiply $\frac{4}{8\left(a^{2}+1\right)}$ times $\frac{\left(a-1\right)\left(a+1\right)}{\left(a-1\right)\left(a+1\right)}$.
Since $\frac{\left(5a-7\right)\times 2\left(a^{2}+1\right)}{8\left(a-1\right)\left(a+1\right)\left(a^{2}+1\right)}$ and $\frac{4\left(a-1\right)\left(a+1\right)}{8\left(a-1\right)\left(a+1\right)\left(a^{2}+1\right)}$ have the same denominator, subtract them by subtracting their numerators.