Model calculation of the interaction terms and ground states of the extended Hubbard model on a dimer