You can't tell which is active, but you can see if each timeline is opened with c4d.IsCommandChecked()
It would be nice if there was a way to get the currently-selected timeline or object manager, similar to the way we can get the activebasedraw. There's unique selections in each manager, so if you want to work on the keys the user expects you need to know which timeline they're currently working in.