Given data
*The given force constant of spring is k = 1600 N/m
*The given mass of the book is m = 1.2 kg
*The given height is h = 0.8 m
The formula for the maximum distance by which the spring will be compressed is given by the conservation of energy as

*Here U_s is the spring potential energy.
*Here U_B is the book potential energy.
*Here g is the acceleration due to the gravity
Substitute the known values in the above expression as

Hence, the maximum distance by which the spring will be compressed is d = 0.12 m