To solve for the number of pants (p) and the number of shirts (s) bought, we can set up the following system of equations:
Equation 1: p + s = 14
This equation represents the total number of clothing items, where p represents the number of pants and s represents the number of shirts.
Equation 2: 12.50p + 4.0s = 107
This equation represents the total cost of the clothing items, where 12.50p represents the cost of the pants and 4.0s represents the cost of the shirts.
By solving this system of equations, we can find the values of p and s that satisfy both equations simultaneously.