One morning, early, Mr Fitzwarren had just come to his counting-house and seated himself at the desk, to count over the cash, and settle the business for the day, when somebody came tap, tap, at the door. 'Who's there?' said Mr Fitzwarren. 'A friend,' answered the other; 'I come to bring you good news of your ship Unicorn.' The merchant, bustling up in such a hurry that he forgot his gout, opened the door, and who should he see waiting but the captain and factor, with a cabinet of jewels and a bill of lading
This is from a English fairly tale. Could you teach me the meaning and structure of "who should he see waiting but the captain and factor"?