Logic Design simple door security system with using MUX
Remember that the combinational logic circuit gives you a 2 bit output, making 4 possible combinations that you have (no card/valid code 1 and 2/invalid code). A 4x1 multiplexer chooses an output from 4 inputs based on a selector input - that is, 2 bits. Ideally you would want to attach the A and B outputs to the MUX inputs - then based on your spec, choose when the output should be on. Then from here, you choose which of the 4 inputs is connected high, and which are grounded.

For e.g., if you want to sound the alarm, then you must make the output 1 for the alarm signal (that is, 0 and 0 for A and B). For that MUX, make the topmost(conventionally) input high, and ground the rest. Then you use 2 other MUX (or maybe 1?) for the doors 1 and 2. Here is an example of the alarm multiplexer, as it only needs to be on for 00 as AB:



EDIT: Here is a crude solution for the multiplex output for your question, using 3 MUXes. See if you can understand how they all work.