Henry paid $.80 for each bag of peanuts. He sold all but 20 of them for $1.50 and made a profit of $54. How many bags did he buy? (HINT: Profit = selling price-buying price.)

Let x = number of bags bought.

1.50(x-20) - .80x = 54

Solve for x.

To find out how many bags Henry bought, we need to use the provided information and work backwards. Let's go step by step:

1. Let's assume Henry bought 'x' bags of peanuts.

2. We know that Henry paid $0.80 for each bag of peanuts. So, the cost of 'x' bags would be 0.80 * x = $0.80x.

3. Henry sold all but 20 of the bags for $1.50 each. The total number of bags he sold would be (x - 20) bags. The amount he earned from selling these bags would be (x - 20) * $1.50 = $1.50(x - 20).

4. We are given that Henry made a profit of $54. Profit is calculated by subtracting the buying price from the selling price. So, $1.50(x - 20) - $0.80x = $54.

Let's solve this equation to find the value of 'x':

$1.50x - $30 - $0.80x = $54
$0.70x - $30 = $54
$0.70x = $54 + $30
$0.70x = $84

Dividing both sides by $0.70:

x = $84 / $0.70
x = 120

Therefore, Henry bought 120 bags of peanuts.