The Answer is true, the saying opposites attract are true for magnets when poles match though they repel.
The magnitude of vector b is 8.58 Unit.
Since both the vectors a and b are perpendicular to each other, so we can apply the Pythagoras theorem to calculate the magnitude of the vector b.
Applying the Pythagoras theorem
(a-b)^2=a^2+b^2
15^2=12.3^2-b^2
b=8.58 unit
Therefor the magnitude of the vector b is 8.58 unit.
The change in potential energy of an object is given by

where
m is the mass of the object
g is the gravitational acceleration

is the increase in altitude of the object
In our problem,

is the mass of the book,

and

is the increase in altitude of the book, so its variation of potential energy is