Math puzzle (cleaner statement)

- You're in a jail cell with two doors, A and B
- There's 3 keys; the A door key, the B door key, and a dud key
- Design an optimal key-trying strategy: a strategy which gets you out of jail in the minimum expected trials of key-door pairs