I'm really struggling with this word problem, please help. Alex is selling tomatoes. last week he bought some at $20 for 50 tomatoes and sold them (except for 30 rotten ones) at 120c each to make $84 profit. how many tomatoes did he buy?

let n be the number he originally bought

cost = 20(n/50) = 2n/5

number he sold = n-30
return = 1.2(n-30)

profit equation:
1.2(n-30) - 2n/5 = 84
1.2n - 36 - 2n/5 = 84
1.2n - .4n = 120
.8n = 120
n = 150

he bought 150 tomatoes

check:
cost to buy them = 20(150/50) = $60
return = 1.2(150-30) = $144
profit = 144-60 = 84
My answer is correct