Is there a better way to do this? Do A for X min, then B for Y minutes, then A for Z minutes

See this post for one way of running timers in an FSM.