<s>[INST] The set of values of $p$ for which the points of extremum of the function $f(x)=x^3-3px^2+3(p^2-1)x+1$ lie in the interval $(-2,4)$ The set of values of $p$ for which the points of extremum of the function $f(x)=x^3-3px^2+3(p^2-1)x+1$ lie in the interval $(-2,4)$ is
$(A)(-3,5)$
$(B)(-3,3)$
$(C)(-1,3)$
$(D)(-1,5)$

$$f'(x)=3x^2-6px+3(p^2-1)=3[(p-x)^2-1]$$
For the points of extremum to lie between $(-2,4)$
The vertex of the parabola $f'(x)=3x^2-6px+3(p^2-1)$ should lie between $(-2,4)$
The vertex of the parabola $f'(x)=3x^2-6px+3(p^2-1)$ is $2p$
$$-2<2p<4\implies -1<p<2$$
But the answer is $(-1,3)$
 [/INST] The x-coordinate of vertex of the quadratic equation is $-\dfrac{b}{2a}$, not $-\dfrac{b}{a}$.
Here is where you went wrong.
</s>