chrispat,
The equations in your attempt are all correct statements in that you have appropriate expressions for the quantities vi, Ui - spring, UI - grav, etc. However, when are you declaring your initial values? That is, when during the experiment are you setting time = 0? That decision is...