P0 and P2 alone are insufficient to produce P1.
Beyond that, photographs of code are not a thing. If you post a code snippet, ALWAYS USE CODE TAGS:
How to use code tags: Using code tags properly
If you’re just trying to simulate a ballistic trajectory it has nothing to do with bezier curves. An object undergoing constant acceleration (gravity) in a frictionless environment will trace some portion of a parabola (y = a x^2 +b)