The motion along the x-axis and y-axis are independent, thus they have different formulas. $$ x = {x}_{0} + v_xt.$$ $$ y={y}_{0}+{v}_{0y}t-\frac{1}{2}{\mathrm{gt}}^{2}\\ .$$