\(A=\frac{\left|x-1\right|+\left|x\right|-x}{3x^2+4x+1}=\frac{1-x-x-x}{3x^2+3x+x+1}=\frac{1-3x}{\left(x+1\right)\left(3x+1\right)}\)
\(B=\frac{\left|2x-1\right|+x}{3x^2-22x+7}=\frac{1-2x+x}{3x^2-21x-x+7}=\frac{1-x}{\left(x-7\right)\left(3x-1\right)}\)