Type O blood has RBC's without antigens. It also has plasma that contains A and B antibodies. So, If you give type A blood which has B antibodies in its plasma (only giving the plasma, not the RBC's), it will not harm the patient because the patient is already "conditioned" to type B antibodies.
The same for giving type B blood plasma (the plasma has A antibodies), the patient is "conditioned".
However, you cannot give A, B, AB RBC's to the O type patient. The patients A and B antibodies will cause hemolysis with the A, B, AB antigens.
The same with type B blood which has A antibodies. It will not harm the patient. The patient is "conditioned" to type A antibodies.