In any language, in mathematical operations, braces () will be given top priority. So is something is written in (), it will be executed first. Later * and / will be given next priority. So if () is not given then multiplication and division will be executed. Then addition and subtraction will be executed.
a+a*(b-c)+d*(b-c).
Here (b-c) will be executed first because of braces. Then a*(b-c) and d*(b-c) will be executed. Finally all results are added.