A person can ask for forgiveness for another person’s sins, especially when such sins affect her or him. This can save the person who did not sin from destruction. But the sinner can still get punished.
If we look at Abigail, the wife of Nabal, we see an interesting story about forgiveness. Abigail asks for forgiveness. But this request is for something her husband did. David gave protection to Nabal’s farmers against attacks. In return, David asked Nabal to “share any provisions you might have” (1 Samuel 25:8). But Nabal refused. So David went with 400 men to kill Nabal and his family. But Nabal’s wife, Abigail, heard what her husband did. And she met David before he reached Nabal. She met David with the provisions. This is when Abigail said, “Please forgive the trespass of your maidservant” (1 Samuel 25:28). Here Abigail asks for forgiveness. But what wrong has she done? Abigail has done nothing wrong. She asks for forgiveness for the actions of her husband Nabal, who refused David. For Nabal returned David’s protection by not giving David’s men provisions. So Abigail asks for forgiveness for Nabal’s sin. Nabal did not know this happened. But when he found out, God killed him. But Abigail and her household were spared.