Hi there!
Ted bought n rolls of film.
We know that he sold all but 2.
That means that Ted sold n-2 rolls of film.
We know that each roll was sold for 1 dollar more.
Multiply 1 dollar with n-2 to get the profit.
1*(n-2) = n-2
That's the profit.
We also know that
Original price + profit = total money received from selling
The original price was 40 dollars.
Add that to n-2, which was the profit.
n - 2 + 40 = n+38
Ted received n+38 dollars when he sold the rolls.
Have an awesome day! :)
~collinjun0827, Junior Moderator