What happens if the legend rule doesn't apply to only one of a pair of legendary creatures with the same name?
You get to keep all 3 creatures.
The legend rule reads:

704.5j If a player controls two or more legendary permanents with the same name, that player chooses one of them, and the rest are put into their owners’ graveyards. This is called the “legend rule.”

The Brothers' ability makes the legend rule not apply to them as long as there are exactly 2 of them on the battlefield. What &quot;not applying&quot; means can be derived from the rulings for Mirror Gallery or Sakashima of a Thousand Faces:

Mirror Gallery removes the “Legend rule” while it’s on the battlefield.[..]


While the “legend rule” doesn’t apply to permanents you control, you can control any number of legendary permanents with the same name and none of them will be put into the graveyard.

While Mirror Gallery is on the battlefield, the game is played as though the legend rule did not exist, or, put differently, the legend rule check is disabled for all permanents.
Accordingly, while exactly two Brothers Yamazaki are on the battlefield, the legend rule is not checked for either of them. Any legend rule check that would compare either of the Brothers Yamazaki to any other permanent for name identity is not performed at all. That means the Grizzly Bears is also safe from the legend rule, because the one check that could get them killed (with the Spy Kit'ed Brothers) is not performed.
Therefore, it does not matter whether or not either of the Brothers shares a name with Grizzly Bears or yet other permanents. As far as the legend rule is concerned, the two Brothers do not exist on the battlefield at all.