First solution can be:
L = S+4
8L = 12S-24 substitute for L:
8(S+4) = 12S-24
8S+32 = 12S-24 add 24 on both sides and subtract 8S on both sides, and you get:
56 = 4S rewrite to get the unknown on the left:
4S = 56
S = 14 this is the cost of a small bottle.
Other solution can be like this:
Let cost of each small bottle be S
The cost of each large bottle = S + 4
We then get: 8(S + 4) = 12S - 24
8S - 12S = - 24 - 32
- 4S = - 56
S, or cost of each small bottle = -56/-4 = $14