You just need to be familiar with the standard order of operations. Anything grouped by parentheses is evaluated first, exponentiation comes next, followed by multiplication and division (left-to-right), and then addition and subtraction (left-to-right).
Here are some things to watch out for:
After grouping, exponentiation always comes first. e^2-x means so for you should write e^(2-x). Similarly, when writing rational exponents, make sure you use parentheses. 2^1/2 would technically mean
Next, be careful with rational functions: division comes before addition or subtraction. So x^2-3x+2/x-2 means
you should write (x^2-3x+2)/(x-2).
Finally, be careful when you are dealing with functions, limits, summations, integrals, or anything that can take an expression as an argument. The usual convention is for the argument/operand to include everything to the right up to the first addition or subtraction (unless it is in parentheses). sin x+2 should mean use sin(x+2) to indicate But it is usually okay to express as sin 2x.
And remember that it is usually never a bad idea to use extra parentheses even where they are not needed, just to further clarify what you are trying to write (as long as you don't do something obviously obnoxious like throwing 20 parentheses around each number). If you are trying to write you should be able to get away with doing ln 2x+5, but it would be much better to write ln(2x)+5 to eliminate any confusion.