Two SR latch implementations and De Morgan's rule
You have eliminated the NOT gates by moving the inversion to the outputs of the AND gates, thus changing them into NAND gates. But the two outputs Q and Q' are now no longer connected to the AND outputs, but to the NAND outputs, so they have the opposite value, and you have to relabel them as Q' and Q.