Simplification and solving for x