I believe your calculations for mapping 3D to 2D vectors is slightly wrong. To do this, I assume you already have a target Vector3. The Y value would be the difference between the Y value of the target and the Y Value of the origin. The X value would be the magnitude of the difference between the two vectors if their Y value was the same. I’m a little rusty on my vector math so I may not be the best source for this.
Then you can plug in these value as the respective X and Y values for your function.
P.S., perhaps consider using the acceleration property of FastCast
or this tutorial: Modeling a projectile's motion