Let's use the variable x to represent the total number of mangoes.
If 60% of the mangoes are green, so the other 40% are ripe mangoes.
If all the ripe mangoes and 1/5 of the green mangoes corresponds to 78 mangoes, so we can write the following equation:
[tex]40\text{\%}\cdot x+\frac{1}{5}\cdot60\text{\%}\cdot x=78[/tex]Solving this equation for x, we have:
[tex]\begin{gathered} 0.4x+\frac{1}{5}\cdot0.6\cdot x=78 \\ 0.4x+0.12x=78 \\ 0.52x=78 \\ x=\frac{78}{0.52} \\ x=150 \end{gathered}[/tex]Therefore the initial amount of mangoes is 150.