Event tickets cost $20 each. A student ordered some tickets online. There was a service charge of $2.50 per ticket. The total cost was $540.

AWrite a function rule for the cost of n number of tickets.
BHow many tickets did the student order?

Please answer both, thankyou.