Variational study of the extended Hubbard-Holstein model on clusters of variable site spacing