In this paper we introduce the bosonic generators of the sp(4, R) algebra and study some of their properties, based on the SU (1, 1) and SU (2) group theory. With the developed theory of the Sp(4, R) group, we solve the interaction part of the most general Hamiltonian of a two-level system in two-dimensional geometry in an exact way. As particular cases of this Hamiltonian, we reproduce the solution of earlier problems as the Dirac oscillator and the Jaynes-Cummings model with one and two modes of oscillation.