Leibniz's Law is usually a good form of argument---so long as it's the same property that the one object has and the other object lacks.
However, we have to be extremely careful when we're dealing with properties that have to do with what one believes, or has evidence for believing, or doubts, or hopes to be the case. After all, Lois Lane believes that Superman is strong but she does not believe that the mild-mannered reporter Clark Kent is strong. But Superman is one and the same person as Clark Kent. Similarly, Lois can hope that Superman will kiss her, and fail to hope that the mild-mannered reporter Clark Kent will kiss her, even though, again, Superman is the mild-mannered reporter Clark Kent.Here's another example. Suppose that Lex Luthor thinks he has succeeded in destroying Superman. In fact, Superman is alive and well, and is walking on the street below, dressed as Clark Kent. Lex argues:
All of the premises of this argument may be true. Yet its conclusion is false. Superman is one and the same man as the reporter Lex sees. So this argument must be invalid. It is invalid because Leibniz's Law cannot be legitimately used when you're dealing with what people believe, or have evidence for believing, or doubt, or hope to be the case.
Here are some other illegitimate uses of Leibniz's Law:
I think that that reporter is wearing a gray suit. I do not think that Superman is wearing a gray suit. So that reporter has some property which Superman lacks: namely, whether he is thought by me to be wearing a gray suit. So by Leibniz's Law, that reporter must not be Superman.I am afraid of Superman. I am not afraid of that reporter. So Superman has some property that reporter lacks: namely, the property of my being afraid of him. So again, by Leibniz's Law it follows that Superman is not the same person as that reporter.
There are big debates in contemporary philosophy about how we should explain these kinds of properties. We can't get into those debates here. If you take more advanced classes in philosophy of language or philosophy of mind, you will definitely spend time studying these debates. All you need to know for this class is that Leibniz's Law breaks down when you're dealing with these kinds of properties.
Sometimes philosophers have tried to argue for dualism like this:
Recall the predicament of people inside The Matrix. Their experiences seem perfectly real to them. They can't tell that it's all just an illusion. At one point in that movie, the character Morpheus says: "Have you ever had a dream, Neo, that you were so sure was real? What if you were unable to wake from that dream? How would you know the difference between the dream world and the real world?"
However, the property of "being rationally doubtable" is in the same boat as properties about what I believe and doubt and have evidence for believing. (Being rationally doubtable seems just to mean that one lacks unimpeachable evidence for believing it.) So, like the bad arguments we considered a moment ago, this too is an illegitimate use of Leibniz's Law.