Unfortunately, it’s not always possible to wash printer cartridge ink stains out of fabric. It depends partly on whether the type of ink in the cartridge is pigmented or dye-based. How the ink is absorbed and how easy it is to get off again also depends on the type of fabric.
Treat the stain immediately with soap and water and follow this with a wash cycle at the hottest temperature that's safe for the fabric – for best results, 60°C or even 95°C. If the stain doesn’t come out during the first wash, don’t iron it as this will set the mark permanently in the garment.