\(P(X)\) is the same as \(P_X\). Here \(P\) is not a function even though it looks like it is a function of the random variable \(X\). \(P(X)\) - the whole thing is a function that takes in Borel sets over the real line as input. This means that \(P(X)\) and \(P(Y)\) don’t refer to the “same” entity “\(P\)”. The “\(P\)” here is different from the \(P: \mathscr F \rightarrow [0, 1]\) over events that we know and love. Here the two \(P\)s refer to two different distributions on two different random variables. I am guessing this notation was adopted because it is easy to read conditional distributions as \(P(X, Y \mid Z)\) instead of \(P_{X, Y \mid Z}\).
\(P(X = x)\) same as \(P_X(\{x\})\) or more pedantically \(P(\{\omega: X(\omega) = x\})\). Here the first and the last “\(P\)” are the same \(P: \mathscr F \rightarrow [0, 1]\). Similarly \(P(x_0 \le X \le x_1)\) is the same as \(P_X([x_0, x_1])\) or more pedantically \(P(\{\omega: x_0 \le X(\omega) \le x_1\})\).
\(P(X, Y)\) is the same as \(P_{X, Y}\). \(P(X = x, Y = y)\) is the same as \(P_{X, Y}(\{(x, y)\})\) which is the same as \(P(\{\omega: X(\omega) = x, Y(\omega) = y\})\).
\(p_X\) is the p.m.f of the random variable \(X\). \(p_x(x)\) is used to refer to the output of the p.m.f for a specific value \(x\). Some ML books will use \(p(x)\) to denote the p.m.f over the random variable \(X\). The convention is that the letter used inside the parens is the lowercase of the random variable which is the uppercase. So \(p(t)\) is used for \(p_T\). Here both the \(p\)s mean different things. And \(p(x)\) can mean the function or its output depending upon the context.
The p.m.f \(p_x\) and the distribution of \(X, P_X\) are not the same even when \(X\) is discrete. Their output is a probability, but their input is of different types - \(p_x\) takes in real numbers, \(P_X\) takes in Borel sets of real numbers. They both give the same output when we pass a singleton, i.e., \(p_X(x) = P_X(\{x\})\).