A is blade vane sight, lines up with a small blade in front of commanders periscope in hatch.
B is Alidade sight.
Both used by commander to get the turret almost on target so that the gunner can pick it up in his periscope/telescope.
The advantage of the Alidade is it enables the commander to use it without having to look through his telescope and is able to be used for targets above and below the position of the tank to a greater degree than the blade vane sight.
A is definately US origin, B is, I suspect British but the US were certainly fitting them to their own tanks so I'm not sure.
When? Hard to say. My Sherman V, built in September 1942 has B but not A and there was no trace of it ever having been there.