Statistical Inferences For Two-Stage Treatment Regimes For Time-To-Event And Longitudinal Data