a) \(\left(3x-1\right)\left(2x+7\right)-\left(x+1\right)\left(6x+5\right)=x+2-\left(x-5\right)\)
\(\Rightarrow\left(6x^2+21x-2x-7\right)-\left(6x^2+5x+6x+5\right)=x+2-x+5\)
\(\Rightarrow6x^2+19x-7-6x^2-11x-5=7\)
\(\Rightarrow8x-12=7\)
\(\Rightarrow8x=7+12\)
\(\Rightarrow8x=19\)
\(\Rightarrow x=\dfrac{19}{8}\)
b) \(\left(x+1\right)\left(x+2\right)\left(x+5\right)-x^3-8x^2=27\)
\(\Rightarrow\left(x^2+3x+2\right)\left(x+5\right)-x^3-8x^2=27\)
\(\Rightarrow x^3+3x^2+2x+5x^2+15x+10-x^3-8x^2=27\)
\(\Rightarrow17x+10=27\)
\(\Rightarrow17x=17\)
\(\Rightarrow x=1\)