Hello,
We know that the cost of a sandwich is 1s (we call "s" the unknown variable of sandwich) and the cost of a drink is 1d (we call "d" the unknown variable of drinks). 5 friends order those sandwiches and drinks. For example, a sandwich may cost $1.00 and a drink $1.50. Now, the total of only one friend would be found by summing the price of a sandwich and the price of a drink. Then the total for one friend is given by 1s + 1d (or simply s + d).
Let's suppose they all buy the same sandwich and the same drink, they would all pay $1.00 and $1.50. We substitute the values s = $1.00 and d = $1.50
The total of all the sandwiches and drinks ordered by all the friends is given by 5 times the sandwiches (since they order five sandwiches) and 5 times the drinks (since they order five drinks).
So, one way to compute it is summing the sandwiches and drinks. 5s + 5d
Now, one friends pays a total of $1.00 + $1.50 = $2.50
Since they all pay $2.50, you multiply the total for 5.
This means the second way to compute this is 5(s + d)
This is called distributive property, where you group a common factor (in this case 5) and divide all terms by 5.
Then, once you have the factored result, just multiply 5 for each term in the parenthesis.
Hope this helped ^^