Blood of AB group donor cannot be given to a B group patient because:
The patient has anti-A antibodies
Blood of AB group has both, A and B antigens on its RBCs. A person with blood group B has B antigens on its RBCs and produces anti-A antibodies in the plasma. These Anti A antibodies will act against the A antigens of AB blood group and cause agglutination, which can be fatal for the recipient.