Two-side boundary value problems in distance-regular graphs