L = Lower box tickets amount.
U = Upper box tickets amount.
we know the whole amount sold were 254 of both, thus
L + U = 254.
since we know the price of L is 12.5 for each, then the amount of money sold total for all of them has to be 12.5 * L, or
12.5L.
and the U is 10, so its total amount of money for it is
10U.
we also know that the total amount for both spent was 2745, thus
12.5L + 10U = 2745.

so, 172 Upper box tickets were sold then.
how many Lower box tickets were sold? well,
L = 254 - U