Answer
a) $ 6.95 \;\rm yr$
b) $3.0 \;\rm ly$
Work Step by Step
a) We can assume that the Earth is the stationary reference frame, and hence the time measured on Earth by an observer relative to the time measured on the spaceship itself is given by
$$\dfrac{\Delta t_E}{\Delta t_s}=\gamma$$
where $E$ is for Earth and $s$ is for the spaceship.
Thus,
$$\Delta t_E=\gamma \Delta t_s$$
$$\Delta t_E=\sqrt{\dfrac{1}{1-\frac{v^2}{c^2}}}\;\Delta t_s\tag 1$$
Now we need to find the relative speed which is the same in both reference frames.
$$v=\dfrac{\Delta x_E}{\Delta t_E}$$
where $\Delta x_E$ is the distance measured from Earth's reference frame.
Plugging into (1);
$$\Delta t_E =\sqrt{\dfrac{1}{1-\frac{\left(\frac{\Delta x_E}{\Delta t_E}\right)^2}{c^2}}}\;\Delta t_s $$
Squaring both sides;
$$\Delta t_E^2 = \dfrac{\Delta t_s^2 }{1-\dfrac{ \Delta x_E^2 }{\Delta t_E^2c^2}} $$
$$\Delta t_E^2-\dfrac{ \Delta x_E^2 }{ c^2} = \Delta t_s^2 $$
Thus,
$$\Delta t_E^2 = \Delta t_s^2 + \dfrac{ \Delta x_E^2 }{ c^2}$$
$$\Delta t_E =\sqrt{ \Delta t_s^2 + \dfrac{ \Delta x_E^2 }{ c^2}}$$
Plugging the known;
$$\Delta t_E =\sqrt{ 3.5^2 + \dfrac{ (6c)^2 }{ c^2}}$$
$$\Delta t_E =\color{red}{\bf 6.95}\;\rm yr$$
----
b) We know that the distance measured by a person on the spaceship will be shrunk relative to the real distance measured by a person on Earth.
And we know that the relative speed is the same, so
$$v=\dfrac{\Delta x_E}{\Delta t_E}=\dfrac{\Delta x_s}{\Delta t_s}$$
Solving for $\Delta x_s$;
$$\Delta x_s=\dfrac{\Delta x_E\Delta t_s}{\Delta t_E}$$
Plugging the known;
$$\Delta x_s=\dfrac{6 \times 3.5}{6.95}$$
$$\Delta x_s =\color{red}{\bf 3.0}\;\rm ly$$