We solve the Dirichlet and mixed Dirichlet-Neumann boundary value problems for the variable coefficient Cauchy-Navier equations of elasticity in a square using a Legendre spectral Galerkin method. The resulting linear system is solved by the preconditioned conjugate gradient (PCG) method with a preconditioner which is shown to be spectrally equivalent to the matrix of the resulting linear system. Numerical tests demonstrating the convergence properties of the scheme and PCG are presented.