270 tickets were sold at a school event. The total money collected is $1700, if the adults cost $10 and the student section cost $5. How many adult tickets were sold?

My teacher gave this to us but he didn't explain it how. Can you help me answer this question and show the equation?

10 a + 5 s = 1700

so
s = 340 - 2 a

s+a = 270
340 - 2a + a = 270

a = 340-270

a = 70