Can someone please help me with a formula to find the largest time value in the scenario below?

09:06:15 | To City |

09:22:11 | To City |

09:23:04 | To City |

09:27:51 | To City |

09:28:53 | Dead |

10:27:05 | Dead |

10:28:17 | Dead |

16:25:08 | Dead |

22:01:08 | Dead |

22:09:54 | 0 |

22:15:32 | 0 |

22:18:59 | 0 |

22:22:49 | To City |

22:36:07 | To City |

22:36:54 | To City |

22:53:04 | To City |

<colgroup><col><col></colgroup><tbody>

</tbody>

In the data above, I need formula to give me value 9:27:51. I tried looking for largest value in column A if values in column B for next 20 rows are same. It gives me answer 22:53:04. This is not what I want. I want the answer to be 9:27:51. Is it possible?

Thanks

Asad