a) Ta có: \(B=\dfrac{x^2}{5x+25}+\dfrac{2\left(x+5\right)}{x}+\dfrac{50+5x}{x\left(x+5\right)}\)
\(=\dfrac{x^2}{5\left(x+5\right)}+\dfrac{2\left(x+5\right)}{x}+\dfrac{50+5x}{x\left(x+5\right)}\)
\(=\dfrac{x^3}{5x\left(x+5\right)}+\dfrac{10\left(x+5\right)^2}{5x\left(x+5\right)}+\dfrac{250+25x}{5x\left(x+5\right)}\)
\(=\dfrac{x^3+10x^2+100x+250+250+25x}{5x\left(x+5\right)}\)
\(=\dfrac{x^3+10x^2+125x+500}{5x\left(x+5\right)}\)
\(=\dfrac{x^3+5x^2+5x^2+25x+100x+500}{5x\left(x+5\right)}\)
\(=\dfrac{x^2\left(x+5\right)+5x\left(x+5\right)+100\left(x+5\right)}{5x\left(x+5\right)}\)
\(=\dfrac{\left(x+5\right)\left(x^2+5x+100\right)}{5x\left(x+5\right)}\)
\(=\dfrac{x^2+5x+100}{5x}\)
b) Thay x=-2 vào biểu thức \(B=\dfrac{x^2+5x+100}{5x}\), ta được:
\(B=\dfrac{\left(-2\right)^2+5\cdot\left(-2\right)+100}{-5\cdot2}=\dfrac{4+100-10}{-10}=\dfrac{94}{-10}=-\dfrac{94}{10}=\dfrac{-47}{5}\)
Vậy: Khi x=-2 thì \(B=-\dfrac{47}{5}\)