Answer
$(x-3)^2+(y-8)^2+(z-1)^2=30$
Work Step by Step
Since the sphere is centered at $(3,8,1)$ and passes through $(4,3,-1)$, we know the radius is the distance between these two points.
Using the distance formula, we get
$$r=\sqrt{(3-4)^2+(8-3)^2+(1+1)^2}
\\=\sqrt{(-1)^2+(5)^2+(2)^2}
\\=\sqrt{1+25+4}\\=\sqrt{30}.$$
Hence we have a sphere centered at $(3,8,1)$ and with radius $r=\sqrt{30}$.
Thus the equation of the sphere is
$$(x-3)^2+(y-8)^2+(z-1)^2=30$$