<s>[INST] if a,b,c are roots of a cubic equation then for the following question... If $a, b, c$ are roots of $x^3 -3x^2 + 2x +4 = 0$ and
$$y= 1 + \frac{a}{x-a} + \frac{bx}{(x-a)(x-b)} + \frac{cx^2}{(x-a)(x-b)(x-c)}$$
then value of $y$ at $x=2$ is:
 [/INST] At $x=2$ we have 
$$y=\frac{4 c}{(2-a) (2-b) (2-c)}+\frac{2 b}{(2-a) (2-b)}+\frac{a}{2-a}+1=-\frac{8}{(a-2) (b-2) (c-2)}$$
Which is
$$y=\frac{8}{-a b c-4 (a+b+c)+2 (a b+a c+b c)+8}$$
In the given  equation $x^3 -3x^2 + 2x +4 = 0$ we know the roots $a,b,c$ so we can write $(x-a)(x-b)(x-c)=0$ that is $$x^3-x^2 (a+b+c)+x (a b+a c+b c)-a b c=0$$
Thus, comparing with the equation's coefficient, we get
$$a+b+c=3;\;a b+a c+b c=2;\;abc=-4$$
Substitute in the expression for $y$ and get
$$y=\frac{8}{4-4 \cdot 3+2 \cdot 2+8}=2$$
</s>