The order of operations was changed. In the first equation I assume PEMDAS was used, and in the second it seems you went in order.