Notam x; y; z sumele pe care le primesc cei 3 elevi.
x+y+z=25 lei+20 bani
x=y+2lei+40 bani
=> y=x-(2lei +40 bani)
y=(x+z)/2 => 2y=x+z
2y-y=x+z-[x-(2lei +40 bani]
y=z+2lei+40 bani => x=z+2lei+40 bani+2lei +40 bani
x=z+4lei+80 bani
x+y+z= z+4lei+80 bani+z+2lei +40 bani+z
3z+7 lei +20 bani=25 lei+20 bani
3z=25lei-7lei
z=18 lei:3
z=6 lei (al 3-lea elev)
x=6lei+4lei+80 bani
x=10lei+80 bani (primul elev)
y=6 lei+2lei+40 bani
y=8 lei 40 bani (al 2-lea elev)
verificare:
(10 lei+80 bani)+(8 lei+40 bani)+(6 lei) =25 lei 20 bani; (in total)
10 lei+80 bani =8 lei+40 bani+2 lei+40 bani; (x=y+2 lei + 40 bani)
8 lei+40 bani=(10 lei+80 bani+6 lei)/2; (y=(x+z)/2)