The following is the manner in which I typically go about solving such problems. It might not be the quickest way to get to the solution, but I would still like to present my approach here.
Suppose the vessel is initially filled with $L$ litres of the liquid. Then, as per the question, the vessel contains $\frac{3L}{8}$ litres of water and $\frac{5L}{8}$ litres of syrup.
Now, suppose that $l$ litres of the liquid is replaced with water. Then, the quantity of water remaining in the vessel would be $\frac{3(L-l)}{8}+l$, and that of the syrup would be $\frac{5(L-l)}{8}$, and as per the question, these should be the same, i.e., \begin{eqnarray} \frac{3(L-l)}{8}+l=\frac{5(L-l)}{8}. \end{eqnarray}
Upon solving the above equation, we get $l=\frac{L}{5}$. Thus, one-fifth of the mixture (liquid) must be drawn out and replaced with water in order that water and syrup be in equal proportions thereafter.