I saw an equation as like that:
$$P(W) = P(W\mid R,S)+P(W\mid !R,S) + P(W\mid !R,S) + P(W\mid R,!S) + P(W\mid !R,!S)$$
Which of these two statements are true?
$$P(W) = P(W\mid R,S)P(R,S)+P(W\mid !R,S)\,P(!R,S) + P(W\mid !R,S)\,P(!R,S) + P(W\mid R,!S)\,P(R,!S) + P(W\,!R,!S)\,P(!R,!S)$$ or $$P(R,S) = P(R\mid S)\,P(S) = P(S\mid R)\,P(R).$$
Is there any document for it?
More specifically, you saw that equation in my flawed answer to this question of yours, which I've now corrected. Your second version is correct.
You could have asked that question as a comment under my answer, or at least linked to that answer. In case you didn't do that so as not to offend me by implying that I made a mistake, there's no need for such restraint – errare humanum est :-)