A body is thrown vertically upward such that it crosses the same height after 2 seconds and after 8 seconds. What is the value of the mentioned height?

The general equation is
y(t)=v0t−2gt2t1=2s;t2=2sy(t1)=v0t1−2gt12y(t2)=v0t2−2gt22
We express the initial velocity from the two equations
y(t1)=v0t1−2gt12→v0=t1y(t1)+2gt12y(t2)=v0t2−2gt22→v0=t2y(t2)+2gt22−>t1y(t1)+2gt12=t2y(t2)+2gt22
Considering
y(t1)=y(t2)=h
We have h=2(t2−t1)g(t22t1−t12t2)=2(8−2)9.81(64∗2−8∗4)=78.48m