By hypothesis, each minute of local calls costs $0.05
So x minutes of local calls will cost 0.05x : You just multiply the cost of 1 minute by the total amount of minutes.
Same thing for long distances calls: Each minute costs $0.12, so y minutes of long distance calls will cost 0.12x
So to get your total charge (local calls + long distance calls), you just need to add the charges for local calls with the charges for long distance calls, which means that you need to add the expressions we got previously:
P = 0.05x + 0.12y (with P the total charge)
Hope this Helps! :)