На первой полке x книг, на второй y книг.
x = (3/4)*y,
x+3 = (4/5)*(y-3)
Решаем систему двух уравнений на неизвестных.
(3/4)*y + 3 = (4/5)*y - (4/5)*3
3 + (4/5)*3 = (4/5)*y - (3/4)*y
3 + (12/5) = ( (4/5) - (3/4) )*y,
(15+12)/5 = ( (16/20) - (15/20))*y,
27/5 = (1/20)*y,
y = (27/5)*20 = 27*4 = 108
x = (3/4)*108 = 3*27 = 81