Call event on start transition

OnStateEnter is called right when you enter a state, but OnStateExit isn’t called until you are completely out of the previous state. I would like to trigger something with the same timing as OnStateEnter, but either (A) on the state I’m exiting or (B) I want to know from where I’m transitioning on StateEnter. Or in other words, how can I implement a sort of OnStateExitBegin?

OnStateExit is already fired in the same frame with OnStateEnter, afaik entering the state is the exact thing which forces previous state to exit. So you can probably put your code to OnStateExit and see all information about what state you are exiting.
You can also try and make StateMachineBehaviour for whole layer or an MonoBehaviour with reference to an animator which will check state everyframe, so in OnStateEnter you just check information about last frame state or something like that.