Finite element solutions for nonhomogeneous nonlocal elastic problems