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:
![40\text{\%}\cdot x+(1)/(5)\cdot60\text{\%}\cdot x=78](https://img.qammunity.org/2023/formulas/mathematics/college/dupk11qti54rkj972sc47sl1vbyxb61hyo.png)
Solving this equation for x, we have:
![\begin{gathered} 0.4x+(1)/(5)\cdot0.6\cdot x=78 \\ 0.4x+0.12x=78 \\ 0.52x=78 \\ x=(78)/(0.52) \\ x=150 \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/buu3sdhjsq4t2hhzcwew9votc4tqfgnjyx.png)
Therefore the initial amount of mangoes is 150.