Text this: Optimal control problems with time delays: Two case studies in biomedicine