Magnitude comparator implementation
It should be easier to implement "equals" with XOR than with AND and OR.  Take a look at the Karnaugh map for a single bit of "equals" and then look at the Karnaugh map for XOR.

I assume you have NOT as well (at least for your variables? (otherwise I don't know how you did it with AND and OR alone.))  If you don't have NOT, then XOR can be used to fake one:
A XOR 1 = NOT A.

For the "greater" and the "less": In the worst case you can take your answer in sum-of-products form and turn it into all NAND gates (by DeMorgan AB+CD = (A NAND B) NAND (C NAND D)).  But you can probably do better.  Again: look at the Karnaugh map for your problem.  Then look at the Karnaugh map for (2-bit) XOR.  Any time you have a checkerboard-like pattern in your Karnaugh map you can probably put an XOR to good use.