How to override instance of class extended from uvm_transaction using "set_inst_override_by_type"?

Other way to come over this problem , while crating uvm object use following syntax.

b1 = B::type_id::create(“b1”, this);
Your code will work fine with this syntax also.