The problem of controlling a compound Poisson process until it leaves an interval is considered. This type known as homing problem. To determine the value optimal control, we must solve nonlinear integro-differential equation. Exact and explicit solutions are obtained for two possible jumps size distributions.