Since the girls raised three times as much as the boys, the money raised by the girls would be "3x".
Total profit from candy sale = Profit from boys + Profit from girls
Total profit = x + 3x
Total profit = 4x
Given that the total profit is $180, we can set up the equation:
4x = 180
Dividing both sides by 4,
x = 45
Therefore, the boys raised $45 for the fund-raiser.