When a creature equipped with Sword of War and Peace deals combat damage to a player, its ability will trigger. When this triggered ability resolves, the Sword’s controller will gain life equal to the number of cards in his or her hand and the player that received combat damage will be dealt damage equal to the number of cards in his or her hand.
The source of this ability and the damage is from the Sword itself, not the creature that the Sword is attached to. It doesn’t matter if the sword is equipped to a creature with Lifelink or Infect–when this triggered ability resolves, the damage will be dealt, but there will not be any special properties to this damage.
For example, if an animated Inkmoth Nexus is equipped with the Sword of War and Peace and deals combat damage to a player, that player will receive three poison counters due to the combat damage from the Inkmoth. However, when the Sword’s triggered ability resolves, that player will be dealt ‘regular’ damage and will not get any additional poison counters.