Total number of permutations are $6!$ and there are $4!$ ways where the word $UP$ shows up and $2!$ ways where the word $LOCK$ shows up. Also, there are two arrangements where both of the the words show up(LOCKUP and UPLOCK). So according to me the final answer must be
$6!-4!-2!-2$
Am I wrong in this answer?
MY ANSWER IS 6! - 5! - 3! +2
THE TOTAL FORMS ARE 6! THE FORMS THAT "UP" APPEARS ARE 5! THE FORMS THAT "LOCK" APPEARS ARE 3! AND THE FORMS BOTH APPEARS IS 2 THEN WE COUNT IT TWICE AND MUST ADD UP IT