This paper considers the first passage times to constant boundaries and the two-sided exit problem for Lévy process with a characteristic exponent in which at least one of the two jumps having rational Laplace transforms. The joint distribution of the first passage times and undershoot/overshoot are obtained. The processes recover many models that have appeared in the literature such as the compound Poisson risk models, the perturbed compound Poisson risk models, and their dual ones. As applications, we obtain the solutions for popular path-dependent options such as lookback and barrier options in terms of Laplace transforms.