I have a spacecraft parked on orbit around the planet. I want to make interplanetary transfer to another planet. I can find the orbit around the Sun that I can use to move from the end of departure planet's sphere of influence to the start of arrival planet SOI for the given amount of time. So, I have two velocities vectors: one is the velocity which I need to have on the border of the first SOI and the second that I will have at the second SOI when I arrive.
I need to calculate impulse (and moment when start it) needed for transfer from current orbit to have the needed velocity at given point (hyperbolic V_infinity). And also the second impulse at arrival planet to go to parking orbit.