  We study the magnetic geodesic flows on 2-surfaces having an additional first
integral which is independent of the Hamiltonian at a fixed energy level. The
following two cases are considered: when there exists a quadratic in momenta
integral, and also the case of a rational in momenta integral with a linear
numerator and denominator. In both cases certain semi-Hamiltonian systems of
PDEs appear. In this paper we construct exact solutions (generally speaking,
local ones) to these systems: in the first case via the generalized hodograph
method, in the second case via the Legendre transformation and the method of
separation of variables.
