ClearAll[y,t]
rovnice:=m y''[t]==0.02
dif=DSolve[rovnice,y[t],t]

vyslpom=y[t]/.dif[[1]]/.{C[1]->0,C[2]->0}
Vysl1=Solve[y==vyslpom,m]/.{t->4,y->3.2}