Putting the zeros of $x^2+3x+2=0$ i.e., $-1,-2$ one by one, in $f(x)=(x+1)^{2n}+(x+2)^n-1$
we get, $f(-1)=(-1+1)^{2n}+(-1+2)^n-1=0$
and $f(-2)=(-2+1)^{2n}+(-2+2)^n-1=0$
(i)So, using Remainder Theorem,
$(x+1)\mid f(x)$ and $(x+2)\mid f(x)\implies lcm(x+1,x+2)\mid f(x)$
(ii) Alternatively,
$\frac{(x+1)^{2n}+(x+2)^n-1}{x+1}=(x+1)^{2n-1}+\frac{(x+2)^n-1}{x+1}$
Now $x+1(=x+2-1)\mid \\{(x+2)^{2n-1}-1\\} $ as $(a-b)\mid (a^n-b^n)--->(1)$
So, $(x+1)\mid f(x).$
$\frac{(x+1)^{2n}+(x+2)^n-1}{x+2}=\frac{\\{(x+1)^2\\}^n-1}{x+2}+(x+2)^{n-1}$
Using $(1),\\{(x+1)^2\\}^n-1$ is divisible by $(x+1)^2-1=x^2+2x=x(x+2)$
So, $(x+2)\mid f(x).$
$lcm(x+1,x+2)=(x+1)(x+2)=x^2+3x+2$ (prove this)