1. She wrote vs you (one woman) wrote
كَتَبَتْ ends with a silent tāʾ; كَتَبْتِ has the addressed ending -ti.
2. They, the women, wrote vs we wrote
كَتَبْنَ ends in -na for feminine plural third person; كَتَبْنَا has a final alif and means “we wrote.”
3. Two men addressed vs two women addressed
Both use كَتَبْتُمَا; context tells us the gender.