Analytical diagonalization study of a two-orbital Hubbard model on a two-site molecule