A tower shield typically grants a Medium wielder total cover against melee attacks launched by Medium foes from the square opposite the shield and from similar foes' melee attacks launched from the squares to the left and right of the square opposite the shield…
The tower shield says
As a standard action, however, you can use a tower shield to grant you total cover until the beginning of your next turn. When using a tower shield in this way, you must choose one edge of your space. That edge is treated as a solid wall for attacks targeting you only. You gain total cover for attacks that pass through this edge and no cover for attacks that do not pass through this edge.
Then Cover says
When making a melee attack against an adjacent target, your target has cover if any line from any corner of your square to the target's square goes through a wall (including a low wall). When making a melee attack against a target that isn't adjacent to you (such as with a reach weapon), use the rules for determining cover from ranged attacks.
So to determine if the defender has cover from them, the Medium foes armed with longswords occupying the left and right squares opposite the tower shield must draw a line from the least advantageous corners of their squares to the most advantageous corner of the defender's square, and such a line will go through the tower shield, giving the defender total cover.
…But for foes making ranged attacks and using reach, it's a little different
Cover also says
To determine whether your target has cover from your ranged attack, choose a corner of your square. If any line from this corner to any corner of the target's square passes through a square or border that blocks line of effect or provides cover, or through a square occupied by a creature, the target has cover (+4 to AC).
Thus, if attackers are employing ranged weapons or attacking with reach, to determine if the defender has cover from their attacks, the attackers, instead, pick the line to be drawn from their most advantageous corners to the defender's most advantageous corner.
While this still leaves the defender with total cover from attacks by the typical Medium attacker on the shield's opposite side, it's unclear if adjacent foes to the left and right of that attacker that are armed with ranged weapons are likewise impaired. The typical Medium creatures to the left and right of the shield opposite side can pick a corner that causes the traced line to skirt the tower shield's border, which would normally be sufficient to grant the defender cover (therefore total cover via the tower shield), but it's only from attacks that pass through the tower shield's edge against which the defender gains total cover, and whether this is through enough is a question for the GM. Ask the GM if it's possible for a dude with a crossbow to run up to the diagonal edge of your tower shield and cap you with a crossbow by, essentially, shooting around the tower shield. If the GM rules it is possible, admire such a foe's bravery before gutting him.
B won't gain cover.
To be "blocked", your line must pass through a border, not just touch it.
I should say the fact borders are mentioned by themselves may realy be missleading. Borders are mentioned specifically because there may be a solid border without a square to belong to. A thing thin enough to be placed between two otherwise clear squares.
Best Answer
RAW: The target has half cover
The Reach quality is a red herring. It doesn't affect whether or not cover applies. The only thing that it does here is allow the attacker to reach the target. With that in mind we can evaluate whether or not an attack from position 'X' incurs cover from position 'T'.
p.250 and p.251 of the DMG have a chart/description.
No matter which corner of the 'X' (I'd use 'A' for attacker, but meh) square you use, you're blocked from 1-2 corners of the 'T' square.
(It's worth noting that this may not be true for all sizes of creatures. If the target is huge, then a medium creature does not "block half of its body", for example)
RAI: Maybe gives cover.
(to reiterate) The cover description states "attack or other effect originates on the opposite side of the cover".
Let's take the following alternative configuration (Target, Creature, Attacker) and compare it against the raw text.
I don't know anyone who would say that 'A' invokes "half cover" attacking 'T'. Furthermore you can move 'A' infinitely out to the right and 'T' would still have "half cover" because you can't draw a line from a corner of 'A' to every corner of 'T' without hitting 'C' in the process.
It seems counter-intuitive to imply that a halfling gives the same sort of partial cover as a stone pillar because the smallest section of his "square" is in the way of the enemy "square".
RACS and RAF? No cover is applied.
It doesn't make sense that half (or less) of a source of half-cover would still provide half cover.
At my table? The attack does not originate from the opposite side, so it would not be considered.
What I would house-rule is:
If 3+ corners were blocked by a half cover source (i.e. a creature), then you would get half cover. Half cover is the lowest form of cover and since it's only two "lines" from attacker corner to target corners, it would get rounded down to nothing.