I have a really elegant solution for this problem. Your main issue is how to determine the vertical distance that the arrow will actually end up traveling. Well since you know the horizontal speed as being:
Vcos(a) (where a is the angle from the horizontal of the arrow being shot).
You can say...