If B cannot see A, A can attack B at advantage
A can see B
A is in darkness which means that they suffer the blinded condition only when trying to see anything only in the darkness around them per the definition of darkness which creates a heavily obscured area.
Darkness creates a heavily obscured area. (PHB 183)
A heavily obscured area—such as darkness, opaque fog, or dense
foliage—blocks vision entirely. A creature effectively suffers from
the blinded condition when trying to see something in that area. (PHB 183)
Since B is not in darkness but is in dim light, A can see B. Here is what the DMG has to say about the limits of vision:
When traveling outdoors, characters can see about 2 miles in any
direction on a clear day, or until the point where trees, hills, or
other obstructions block their view. Rain normally cuts maximum
visibility down to 1 mile, and fog can cut it down to between 100 and
300 feet.
So as long as there is a light source and sight has not been blocked by anything, A should have no issue seeing B even at great distances.
If B cannot see A
If B does not have darkvision beyond 60 feet or does not have it at all, then B cannot see A standing in darkness.
A is standing in darkness, thus B (who has no darkvision) cannot see them.
Since A can see B but B cannot see A, when A attacks their attack will follow the rule for "Unseen Attackers and Targets":
When a creature can't see you, you have advantage on attack rolls against it. (PHB 195)
Thus A's attacks against B will be made at advantage.
If B can see A
If B has darkvision out to 120 feet or some other means of seeing in darkness at A's position 100 feet away, then A is visible. If A is visible, then they do not get any advantage on attacks against B.
The dim lighting does not affect attacks at all
Because the area around B is in dim light the area counts as a lightly obscured area. However, a lightly obscured area has no effect on attacks, only perception checks.
Dim light, also called shadows, creates a lightly obscured area. (PHB 183)
In a lightly
obscured area, such as dim light, patchy fog, or moderate foliage,
creatures have disadvantage on Wisdom (Perception) checks that rely on
sight. (PHB 183)