A)
If the dress costs x and the pair of pants cost $25 dollars less, the cost of the pants will be:

B)
We know that the dress costs x and the pants cost x-25. Molly bought 2 dresses and 3 pairs of pants, with the total amount of $675. Thus:




If x is the dress cost, so the dress will cost $150. And the pants:



The pants will cost $125.