Your solution is correct.
When first time mixture taken out then quantity of water left 19 l.
After that on adding some amount of water. On solving we get that amount is 5 l.
Amount of water is now 24 l.
After that on again taking out 23 l of mixture 4 l water is taken out.
Final amount of water 20 l. That is the answer if asked about final quantity of water.
As you said answer is 24 l. Maybe answer given in book is wrong. Or they are asking about amount of water after adding 5 l ( that you found) water in solution.