You added a to the expression instead of substituting a into the expression for x.