There is ambiguity in the diagram.
If you see switch D, does the box surrounding it part of circuit ? or just to represent D. If it is part of circuit, then D is not at all required. Current will flow towards both $P$ and $\bar{P}$
So it becomes $A.(B+C).(P+\bar{P})$ and we know if $P$ is closed, $\bar{P}$ will be open, both are compliments.
Final answer will be $AB+BC$
Now, lets say for sake of ambiguity, if switch D is mandatory and required to reach the other side, then
$A.(B+C).(DP+D\bar{P})$ because it will depend on switch D which path you take.
Final Answer will be $ABD +ACD$
In both cases, Answers does not match.