NAND and NOR gates are universal. So one way to solve this problem is first reduce the logic using K-maps or whatever, then draw it out with AND, OR, and NOT gates. Then use bubble pushing identity techniques to convert the gates to the desired type.


simulate this circuitsimulate this circuit – Schematic created using CircuitLab