For this problem, you will have to use PEMDAS (Parentheses) (Exponents) (Multiplication/Division) (Addition/Subtraction)
First of all, you will want to solve for the values inside the parentheses first
40 <span>÷ 1+3-(21)+7-5 Now check for anything that includes multiplication/division and do that
40+3-21+7-5 All you have left now is addition and subtraction. It must go from left to right, therefore if addition is first, do addition, if subtraction is first, then do subtraction.