so hmmm, first off, let us use the percentage in decimal format, so 20% is just 20/100 or 0.2 and so on
hmm thus [tex]\bf \begin{array}{lccclll}
&amount&concentration&
\begin{array}{llll}
concentrated\\
amount
\end{array}\\
&-----&-------&-----\\
\textit{20\% pineapple}&x&0.2&0.2x\\
\textit{40\% pineapple}&y&0.4y&0.4y\\
-----&-----&-------&-------\\
mixture&30&0.25&7.5
\end{array}[/tex]
whatever the amounts of "x" and "y" are, we know they have to add up to 30Litres, thus x + y = 30
and we also know the concentrated amount of pineapple, have to also add up to 7.5 thus 0.2x + 0.4y = 7.5
thus [tex]\bf \begin{cases}
x+y=30\implies \boxed{y}=30-x\\
0.2x+0.4y=7.5\\
----------\\
0.2x+0.4\left( \boxed{30-x} \right)=7.5
\end{cases}[/tex]
solve for "x", to see how much of the 20% pure juice will be used
what about "y"? well, y = 30 - x