Notăm:
e = numărul elevilor;
s = suma necesară.
[tex]\it e = \dfrac{s-20}{20}\ \ \ \ \ (1)\\ \\ \\ e=\dfrac{s+5}{25}\ \ \ \ \ (2)\\ \\ \\ (1),\ (2) \Rightarrow \dfrac{s-20}{20}=\dfrac{s+5}{25} \Rightarrow 25(s-20)=20(s+5) \Rightarrow\\ \\ \\ \Rightarrow 25s-500=20s+100 \Rightarrow 25s-20s=100+500 \Rightarrow\\ \\ \\ \Rightarrow 5s = 600|_{:5} \Rightarrow s = 120\ lei[/tex]