A couple of other things to consider:
1. If object B has Bullet behavior with "Bounce off solids=Yes", its angle of motion at the moment of collision with A may be different. You need to get the angle before the bullet has bounced, so in this case you should disable "Bounce off solids" and use "Bounce off object" action instead.
2. To make it look more realistic, you need to decrease the impulse with the angle difference. So if the bullet head-on collided with the object A, the impulse is high, the rotation is low. If the bullet hit the corner of object A, the impulse is small, the rotation is high.