Okay, this all takes place in a nice and simple 2D world... :)
Suppose I have a static object A at position Apos, and a linearly moving object B at Bpos with bVeloci
First rotate the axes so that AB is vertical (by doing a rotation)
Now, split the velocity vector of B into the x and y components (say Bx and By). You can use this to calculate the x and y components of the vector you need to shoot at.
B --> Bx
|
|
V
By
Vy
^
|
|
A ---> Vx
You need Vx = Bx
and Sqrt(Vx*Vx + Vy*Vy) = Velocity of Ammo
.
This should give you the vector you need in the new system. Transform back to old system and you are done (by doing a rotation in the other direction).