Question 828935
x +y = 6700
40x +25y = 185500
we have a 2 by 2 matrix and single column solution vector
we calculate the determinant (D) of a two by two matrix according to this formula
| a  b |
| c  d |
D = ad - bc
for our linear system of equations, the matrix is
|  1  1 |
| 40 25 |
and D = (1*25) - (40*1) = -15
now we need to replace the x column with our column solution vector
|   6700  1 |
| 185500 25 |
Dx = (6700 * 25) - (185500 * 1) = -18000
now we need to replace the y column with our column solution vector
|  1   6700 |
| 40 185500 |
Dy = (1 * 185500) - (6700 * 40) = 185500 - 268000 = -82500
now x = Dx / D = -18000 / -15 = 1200
y = Dy / D = -82500 / -15 = 5500
we have 1200 tickets at $40 and 5500 at $25
check answer 
1200 +5500 = 6700
6700 = 6700
also
(40*1200) + (25*5500) = 185500
48000 + 137500 = 185500
185500 = 185500
answer checks   :-)