I have:
$ P(A,B,C) = P(A|B,C)*P(B|C) * P(C) $
According to chain rule we isolate first random variable and condition it to the rest (joint combinations). etc. etc. But then I was thinking, what if I would joint first two variables and condition it to the last in this manner:
$ P(A,B,C) = P(A,B|C) * P(C) $
This would be legit if
$P(A|B,C)*P(B|C) * P(C) = P(A,B|C) * P(C)$
which infact is. My question is, so this is a legit way of using chain rule or I was just lucky?
Short version: yes, this is legitimate.
Long version:
The main identity here is $P(A \cap B)=P(A \mid B) P(B)$. This identity also holds if all of these $P$'s are conditioned on some fixed event. So you can write $P(A \cap B \cap C)$ as $P(D \cap C)$ where $D=A \cap B$, and then this same identity gives $P(D \cap C)=P(D \mid C)P(C)$ which is what you wrote as $P(A,B \mid C)P(C)$. You can then do it again to get $P(A \cap B \mid C)=P(A \mid B \cap C) P(B \mid C)$, which when substituted in gives your first equation.