Belady's anomaly occurs only for page replacement algorithms that are NOT stack algorithms. A stack algorithm obeys the inclusion property: the set of pages held in a memory of size k frames is always a subset of the set held in k+1 frames for the same reference string. LRU is a stack algorithm, so it can never suffer the anomaly. The random replacement algorithm has no such ordering guarantee, so it can (in some access sequences) exhibit the anomaly. Hence S1 is true and S2 is false.
The key distinguishing property is the stack/inclusion property. LRU obeys it and is therefore immune to Belady's anomaly (S2 false). The random replacement algorithm does not obey it and can exhibit the anomaly (S1 true). Hence option B is correct.