Mealy machine to detect sequence of 2 inputs
No, an XOR gate will not help. In this type of state diagram, it's implicit that in any state, there are three possible inputs: no button, button A or button B. When there's no button press, you always stay in the current state, but for either button press, you need to advance to some other state that depends on which button it is.

As far as implementation with muxes, it's actually quite straightforward. I would just use four 2:1 muxes to turn the JK FFs into D FFs (drive the K input with the negation of the J input), and then use four 64:1 muxes to implement the state transition table directly &mdash; i.e., create a 64&times;4 ROM out of them &mdash; where the select inputs to the muxes are Q3, Q2, Q1, Q0, B and A.