Let's call x the number of $28's tickets sold and y the number of $40's tickets sold.
The total number of seats is 5000 then:

To generate total revenue of $161,600 the tickets sold must be:

In equation 1, solve for x:

Now, replace this into equation 2:

Solve for y:

Replace the y-value into equation 3 and find x:

Now let's check by replacing both values into equation 2:

Answer:
The number of tickets for sale at $28 should be 3200.
The number of tickets for sale at $40 should be 1800.