a: \(\left(n^2+3n-1\right)\left(n+2\right)-n^3+2\)
\(=n^3+2n^2+3n^2+6n-n-2-n^3+2\)
\(=5n^2+5n⋮5\)
b: \(\left(6n+1\right)\left(n+5\right)-\left(3n+5\right)\left(2n-1\right)\)
\(=\left(6n^2+30n+n+5\right)-\left(6n^2-3n+10n-5\right)\)
\(=6n^2+31n+5-6n^2-7n+5\)
\(=24n+10⋮2\)