No, Both of them can be correct.
Because potential energy is the work done by the object on bringing it from a state of higher potential energy to zero potential energy.
since the state of higher potential energy of the book is a constant.
The state of zero potential energy for both the boys can be at different places.
For example, the book is kept in the almirah at second floor.
The boy stating its potential energy to be 20J is standing on the ground floor
And the boy stating its potential energy to be 30J standing in a hole dug in the ground or maybe basement.