Discrete Mathematics - Logic gates so the lamp can glow
I'm assuming the notation on the circuit diagram implies that $P$ leaves the switch labelled as P open while it closes the switch labelled as $\lnot P$.
Since there is no possible closed circuit that bypasses the lamp, any configuration of switches that creates a closed circuit works. In that case, the set of all solutions will be as written below:
$(\lnot R\land(P \lor Q))\lor(P\oplus Q)$
Note that if P is true and Q is false, then that satisfies the (P $\oplus$ Q) portion, and so the answer on the answer key describes one of the few ways to make the lamp glow. Other alternatives would be negating both of those, making R false and P true, or making R false and Q true.