One way to do this is:

The probability the first two dice are the same is 1/6. And, that the third die is different is 5/6. So: 5/36.

Also, the probability the first two dice are different is 5/6 and that the third is the same as one of them is 1/3. So: 5/18

So, total probability is 5/36 + 5/18 = 15/36 = 5/12.

Another way is to calculate the probability they are all different, which is:

5/6 * 4/6 = 20/36

And, the probability that theyy are all the same is 1/36.

So, what's left is the probability that exactly 2 are the same. I.e. 15/36.