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.
[tex]\bf \begin{cases}
L+U=254\implies \boxed{L}=254-U\\
12.5L+10U=2745\\
---------------\\
12.5\left( \boxed{254-U} \right)+10U=2745
\end{cases}
\\\\\\
3175-12.5U+10U=2745\implies 3175-2.5U=2745
\\\\\\
3175-2745=2.5U\implies 430=2.5U\implies \cfrac{430}{2.5}=U\implies 172=U[/tex]
so, 172 Upper box tickets were sold then.
how many Lower box tickets were sold? well, L = 254 - U