Sarah took the advertising department from her company on a round trip to meet with a potential client. Including Sarah a total of 9 people took the trip. She was able to purchase coach tickets for ​$330 and first class tickets for ​$1190. She used her total budget for airfare for the​ trip, which was ​$8130. How many first class tickets did she​ buy? How many coach tickets did she​ buy?

Let's assume Sarah bought x first class tickets and y coach tickets.

According to the given information, the total number of people who took the trip was 9 including Sarah. This means there were 9 - 1 = 8 employees from the advertising department.
Since x first class tickets were bought, the total cost of first class tickets is x * $1190 = $1190x.
Similarly, since y coach tickets were bought, the total cost of coach tickets is y * $330 = $330y.

The total cost of the trip was equal to the total cost of the airfare budget, so the sum of the cost of first class tickets and the cost of coach tickets is equal to $8130:
$1190x + $330y = $8130.

We also know that the total number of tickets used is equal to the total number of people who took the trip, so x + y = 9.

To solve this system of equations, we can use the substitution method. We solve one equation for one variable and substitute it into the other equation.

First, we solve x + y = 9 for x:
x = 9 - y.

Now, substitute x = 9 - y into the equation $1190x + $330y = $8130:
$1190(9 - y) + $330y = $8130.

Expand the equation:
$10710 - $1190y + $330y = $8130.

Combine like terms:
$10710 - $860y = $8130.

Subtract $10710 from both sides:
-$860y = -$2580.

Divide both sides by -860:
y = 3.

Substitute y = 3 into the equation x = 9 - y:
x = 9 - 3 = 6.

Therefore, Sarah bought 6 first class tickets and 3 coach tickets.