Let us assume p=It rains, the q=cricket match will not be played.
I1: If it rains then the cricket match will not be played (p->q)
The cricket match was played. (~q)
Inference: There was no rain.(~p)
p->q
~q
~p (Modus tollens )
Thus I1 is a correct inference.
I2: can be written as
p->q
~p
Given inference - ~q
Not a correct inference. When p is false and q is true, both the premises becomes true but conclusion becomes false.
Hence answer is B