Assuming that the cost of the trip is constant, you can make two equations based on $x$, the total number of students in the class, and $y$, the cost per student when all the students were going on the trip.
From this it is easy to see that $xy=540$, because $x$ students would each pay $y$ dollars to go on the trip.
Given 6 less students, each paying 3 dollars less, the equation becomes $(x-6)(y-3) = 540$, because the cost of the trip remains the same.
Hopefully you can see that this is a nice system of equations for you to solve.