The potential energy stored in a compressed spring is given by the formula:
\[
U = \frac{1}{2} k x^2
\]
where \( U \) is the potential energy, \( k \) is the spring constant, and \( x \) is the compression distance. We need to find \( x \) when \( U = 1.20 \, \text{J} \) and \( k = 800 \, \text{N/m} \).
Rearranging the formula to solve for \( x \), we have:
\[
x = \sqrt{\frac{2U}{k}}
\]
Substituting the given values:
\[
x = \sqrt{\frac{2 \times 1.20}{800}} = \sqrt{\frac{2.40}{800}} = \sqrt{0.0030}
\]
Calculating the square root:
\[
x \approx 0.0548 \, \text{m}
\]
When the book is placed on the spring, the gravitational potential energy of the book is converted into the spring's potential energy at maximum compression. The gravitational potential energy is given by:
\[
U_g = mgh
\]
where \( m = 1.60 \, \text{kg} \), \( g = 9.81 \, \text{m/s}^2 \), and \( h = x \) (the maximum compression). At maximum compression, the spring's potential energy is equal to the gravitational potential energy:
\[
\frac{1}{2} k x^2 = mgh
\]
Substituting the known values and solving for \( x \):
\[
\frac{1}{2} \times 800 \times x^2 = 1.60 \times 9.81 \times x
\]
Simplifying:
\[
400x^2 = 15.696x
\]
Rearranging:
\[
400x^2 - 15.696x = 0
\]
Factoring out \( x \):
\[
x(400x - 15.696) = 0
\]
This gives two solutions: \( x = 0 \) or \( 400x = 15.696 \). Solving for \( x \):
\[
x = \frac{15.696}{400} = 0.03924 \, \text{m}
\]
(a) The spring must be compressed by \(\boxed{0.0548 \, \text{m}}\) to store 1.20 J of potential energy.
(b) The maximum distance the spring will be compressed by the book is \(\boxed{0.03924 \, \text{m}}\).