Look yaar,

At any pt(preferably higher) abve srfce of earth, U frm a co-ordinate axis as pr convntion.Nw imagne a ball drops frm a ht. H.
In ds cse unit vctr of g wl be -j^.
Nw intgrate it --- u wl gt sme unt vctr 4 velcity & displacement since the unit vctrs along the 3 axes in space wl nt change so differentiation or integration vl nt affct it.

Nw apply the sme logic in 2nd case.