Answer
$y(x)=c_1x^2+c_2x^3-x^2\sin x$
Work Step by Step
Given $x^2y''-4xy'+6y=x^4\sin x$
In this case the substitution $y(x) = x^r$ yields the indicial equation
$$r(r-1)-4r+6=0\\
r^2-5r+6=0$$
It follows that two linearly independent solutions to the given differential equation are
$u_1(x)=x^2\\
u_2(x)=x^3$
so that the general solution is
$y(x)=u_1(x)x^2+u_2(x)x^3$
where $u_1$ and $u_2$ are determined from
$u_1'(x)x^2+u_2'(x)x^3)=0\\
u_1'(x)(x^2)'+u'_2(x)(x^3)'=x^2\sin x$
Hence,
$u_1'=-x\sin x\\
u_2'=\sin x$
which upon integration gives
$u_1(x)=x\cos x-\sin x\\
u_2(x)=-\cos x$
Thus, the given equation has general solution
$y(x)=c_1x^2+c_2x^3-x^2\sin x$