Counting occurrence of two events and then displaying the percentage

The Time Series Visual Builder should be helpful here.

Here is some test data I have, to try and match your data:

Here is my metric panel details in the Visual Builder.

I'm running into an issue at the moment (https://github.com/elastic/kibana/issues/13370) but I think this should get you what you want.