Answer:
[tex]\frac{5640-40p}{p-q}[/tex]
Step-by-step explanation:
Here, the total number of television = 40,
Let x be the number of P television,
So, the number of Q television = (40 - x)
Now, the price of each P television is $ p,
∴ The total price of P televisions = xp dollars,
Also, the price of each Q television is $ q,
∴ The total price of Q televisions = (40-x)q dollars,
Thus, the total price of 40 television = xp + (40-x)q = x(p-q) + 40q,
Hence, the average price = [tex]\frac{\text{Total price}}{\text{Number of television}}[/tex]
[tex]=\frac{x(p-q)+40q}{40}[/tex]
According to the question,
[tex]\frac{x(p-q)+40q}{40}=141[/tex]
[tex]x(p-q)+40q=141\times 40[/tex]
[tex]x(p-q) = 5640 - 40q[/tex]
[tex]\implies x=\frac{5640-40p}{p-q}[/tex]
Therefore, there were [tex]\frac{5640-40p}{p-q}[/tex] P model televisions.