Library manipulation and hidden information
Scenario 1: if Player B looks before shuffling, it would (at Comp REL) be Looking At Extra Cards. Players can't look at cards in hidden zones, unless an effect tells them to.
Scenario 2: Player B will see the entire library while resolving Surgical Extraction. I'm hesitant to say it's a “right”, as that's not really a concept defined by the rules. If you prefer to think of it as their right, no harm done.
Note that, if A were to shuffle their library and then hand it to B for the Surgical search, it would (again, at Comp REL) be a Game Rule Violation; players can only shuffle a library when a game mechanic (e.g., pre-game procedure) or a card's effect tells them to.
d:^D