Let x be the number of shirts and y be the number of pants, since the total number of articles must be 9, we can write

Additionally, we know that the total cost must be $264 and 1 shirt cost $24 and 1 pant $36, then we can write

Then, we have the following system of equations:

Solving by elimination method.
By multiplying the first equation by -24, we can obtain an equivalent system of equations:

Then, by adding both equations, we have

Then, we get

Now, in order to find x, we can substitute this result into equation (i). It yields,

which gives

Therefore, the answer is 5 shirts and 4 pants.