Jinshu, If i understand your requirements correctly (apologies if not and please add more info in this case) i don't think this can be achieved by iRules. If you want to down a VS based on the pool availability of another pool this is how i'd do it.
Create a custom monitor for all 3 pool members in VS_B pool and in each monitor assign an Alias Address of the pool member IP. Then assign these 3 monitors to the VS_A pool. This means it will monitor these extra pool members not currently in VS_A pool. I would then change Availability Requirement to, say, At Least 3 (assuming there is already a monitor on VS_A pool). then if two of the monitors go down then you would down VIP A.
Does this make sense / fit your requirements? Again, sorry if i've missed the requirement.
Hope this helps,
N