x-10/100*x - 30/100*x -20 = 70
x-10x/100-30x/100-20 = 70 /*100
100x-10x-30x-2000 = 7000
60x = 7000+2000
60x = 9000
x = 9000:60
x = 150 lei a avut la inceput elevul
10/100*150 = 10*150/100 = 1500/100 = 15 lei costa un stilou
30/100*150 = 30*150/100 = 4500/100 = 45 lei costa un ghiozdan
Verificare
150-15-45-20 = 135-45-20 = 90-20 = 70 lei rest