Answer
a) ${\bf 12.7} \, \text{km}$
b) ${\bf 7.77 \times 10^{-4}} \, \text{s}$
Work Step by Step
If the Sun collapses into a neutron star, a dense sphere of neutrons is formed when protons and electrons are forced together under intense gravitational pressure.
$$\color{blue}{\bf [a]}$$
Since the mass of the Sun remains unchanged, we can calculate the new radius by first finding the volume of the neutron star of the same mass and then solving for its radius.
The volume $ V $ of our new neutron star is given by:
$$
V = \frac{4}{3} \pi r^3 = \frac{M_S}{\rho_{\text{nuc}}}
$$
So, the new radius is then given by
$$r=\sqrt[3]{ \frac{3M_S}{4\pi \rho_{\text{nuc}}}}$$
where the mass of the Sun is $ M_S = 1.99 \times 10^{30} \, \text{kg} $, and the density of nuclear matter is $ \rho_{\text{nuc}}= 2.3 \times 10^{17} \, \text{kg/m}^3 $.
Substituting the values:
$$
r =\sqrt[3]{ \frac{3(1.99 \times 10^{30} ) }{4\pi (2.3 \times 10^{17}) } }=\bf 12735 \;\rm m
$$
Thus,
$$
r =\color{red}{\bf 12.7} \, \text{km}
$$
$$\color{blue}{\bf [b]}$$
We use conservation of angular momentum to find the new rotational period $ T_{\text{after}} $ of the neutron star. Since no external torques are acting on the system, the initial and final angular momenta must be equal.
$$
(I \omega)_{\text{i}} = (I \omega)_{\text{f}}
$$
Where $ I $ is the moment of inertia, and $ \omega $ is the angular velocity.
For a solid sphere, the moment of inertia $ I $ is:
$$
I = \frac{2}{5} M_S R^2
$$
Substituting for the initial and final states:
$$
\color{red}{\bf\not} \frac{2}{5} \color{red}{\bf\not} M_S R_S^2 \omega_{\text{i}} = \color{red}{\bf\not} \frac{2}{5} \color{red}{\bf\not} M_S r^2 \omega_{\text{f}}
$$
Solving for $\omega_{\rm f}$;
$$
\omega_{\text{f}} = \omega_{\text{i}} \left( \frac{R_S}{r} \right)^2
$$
Recalling that $ \omega = \dfrac{2 \pi}{T} $, so
$$
T_{\text{f}} = T_{\text{i}} \left( \frac{r}{R_S} \right)^2
$$
where the initial radius of the Sun is $ R_S = 6.96 \times 10^8 \, \text{m} $, and the Sun’s initial rotation period is $ T_{\text{before}} = 27 \;\rm days$.
$$
T_{\text{f}} = (27\times 24\times 3600) \left( \frac{12.7\times 10^3 }{6.96 \times 10^8 } \right)^2
$$
$$
T_{\text{f}} = \color{red}{\bf 7.77 \times 10^{-4}} \, \text{s}
$$