Vessel contains $3$ parts of soda and $5$ parts of rum.
∴ Total solution in the vessel = $(3+5) = 8$ parts
Assuming,
initially in the vessel, there are $8$ litres of solution in which $3$ litres are soda and $5$ litres is rum.
Now, some solution (assuming $S$ litre) has been taken out and replaced with soda (taken as same amount as $S$ litre) so that the solution contains an equal amount of soda and rum $(1:1)$.
As, $S$ litre of solution has been taken out-
remaining amount of soda in the $(8-S)$ litre solution = $3-\dfrac{3}{8}S$ $\left [ \text{As, S litre solution also has 3 parts of soda and 5 parts of rum } \right ]$
remaining amount of rum in the $(8-S)$ litre solution = $5- \dfrac{5}{8}S$
Now, $S \text{ litre}$ soda also been added in the vessel.
Total amount of soda in the vessel = $3-\dfrac{3}{8}S+S$
Now, as per the criteria, $\left ( 3-\dfrac{3}{8}S \right )$ & $ \left ( 5- \dfrac{5}{8}S \right )$ needs to be same.
∴ $3-\dfrac{3}{8}S+S$ = $5- \dfrac{5}{8}S$
Or, $\dfrac{24-3S+8S}{8} = \dfrac{40-5S}{8}$
Or, $24+5S = 40-5S$
Or, $10S = 40-24$
Or, $S = \dfrac{16}{10} = \dfrac{8}{5}$
∴ $\color{gold}{\dfrac{8}{5} \text{ Lt.}} \color{green}{\text{solution has been removed initially, which is equal to}}$ $\color{gold}{\dfrac{1}{5} ^{th} \text{of 8 Lt.}}$ OR $\color{gold}{\dfrac{1}{5} ^{th} \text{of initial solution}}$ $\color{green}{\text{has been taken out and replaced with soda so that }}$ $\color{green}{\text{the solution contains equal amount of soda and rum}}$