To be clear, I was evaluating the expression, not writing another script. Basically the "show your work" for a math problem. (Nothing wrong with using paper, I find that it helps me a lot if I write things down on paper first, maybe outline what I'm trying to do in flowcharts/pseudocode before jumping in and coding.)
The stuff on the right of the equal sign is all treated as numbers first, and the expression is evaluated.
Then the result is assigned to the variable to the left of the equals sign.
Be careful with dollar signs, many programming languages treat it as a special character for different things.