how to solve linear equations iwth brackets