Hi Yuliya! This is a question with 2 equations.
From the problem you know one type of ticket X costs $40 and one type Y costs $60. So 40X + 60Y= 1560
You also know that the total number of tickets, X + Y = 30 since 30 tickets were sold.
Write X in terms of Y, or X = 30 - y and substitute into the first equation to solve:)