so... let's change the concentration percentage to decimal format. .. so 40% is just 4/100 or 0.4 and so on.
[tex]\bf \begin{array}{lccclll}
&amount&concentration&
\begin{array}{llll}
concentration\\
amount
\end{array}\\
&-----&-------&-------\\
\textit{40\% sol'n}&x&0.4&0.4x\\
\textit{80\% sol'n}&y&0.8&0.8y\\
-----&-----&-------&-------\\
mixture&6&0.5&3
\end{array}[/tex]
so... whatever "x" and "y" may be, we know the must add up to 6 liters.
and whatever 0.4x and 0.8y are, we also know, they must add up to a 3 of concentrated amount.
thus [tex]\bf \begin{cases}
x+y=6\implies \boxed{y}=6-x\\
0.4x+0.8y=3\\
----------\\
0.4x+0.8\left( \boxed{6-x} \right)=3
\end{cases}[/tex]
solve for "x", to see how much of the 40% solution will be needed.
what about "y"? well, y = 6 - x.