At a local play, student tickets cost $5 each and adult tickets cost $10 each. If ticket sales were $3,000 for 500 tickets, how many students attended the play?

Let's use S to represent the number of student tickets sold and A to represent the number of adult tickets sold.

We know that the total number of tickets sold was 500, so:

S + A = 500

We also know that student tickets cost $5 and adult tickets cost $10, and that total ticket sales were $3,000, so:

5S + 10A = 3000

Now we have two equations with two unknowns that we can solve simultaneously. Let's start by solving the first equation for A:

A = 500 - S

Now we can substitute this expression for A into the second equation and simplify:

5S + 10(500 - S) = 3000

5S + 5000 - 10S = 3000

-5S = -2000

S = 400

So 400 student tickets were sold.

Let's solve the problem step by step:

Step 1: Let's assign variables to the unknown quantities:
Let's say the number of student tickets sold is "S",
and the number of adult tickets sold is "A".

Step 2: Write down the given information:
The total ticket sales were $3,000, and the total number of tickets sold was 500.

Step 3: Write down the equations based on the given information:
The equation for the total ticket sales is: 5S + 10A = 3000 (since student tickets cost $5 each and adult tickets cost $10 each)
The equation for the total number of tickets sold is: S + A = 500

Step 4: Solve the system of equations:
We can use the substitution method to solve the system of equations.
Rearrange the second equation to express A in terms of S: A = 500 - S
Substitute this value of A into the first equation:
5S + 10(500 - S) = 3000
Simplify the equation:
5S + 5000 - 10S = 3000
-5S + 5000 = 3000
-5S = -2000
Divide both sides by -5:
S = 400

Step 5: Calculate the number of students who attended the play:
Since S represents the number of student tickets sold, there were 400 students who attended the play.

So, the number of students who attended the play is 400.