Trouble figuring out a Catapult simulation

I want to make a game similar to this one and cant figure out how to move the “tomato”

YktWSKo_UbA

I know that i can get Y from the position of the yellow line in the middle.
What i cant figure out is how to set when the “tomato” will hit the ground.

Some help please?