a,
\(\left(n^2+3n-1\right)\left(n+2\right)-n^3+2\\ =\left(n^2+3n-1\right)n+\left(n^2+3n-1\right)2-n^3+2\\ =n^3+3n^2-n+2n^2+6n-2-n^3+2\\ =5n^2+5n\\ =5\cdot\left(n^2+n\right)⋮5\\ \RightarrowĐpcm\)
b,
\(\left(6n+1\right)\left(n+5\right)-\left(3n+5\right)\left(2n-1\right)\\ =\left(6n+1\right)n+\left(6n+1\right)5-\left(3n+5\right)2n-\left(3n+5\right)\\ =6n^2+n+30n+5-6n^2-10n-3n-5\\ =18n⋮2\\ \RightarrowĐpcm\)