The CPU222 version has eight 24 V DC inputs and two sets of three SPST relay contact outputs, each capable of switching 2A in a voltage range of 5 to 30 V DC or 5 to 250 V AC. Each group of three relays has one contact of each relay in common, connected to the DC or AC supply (external) for that set of three relays.
So, if you are driving two DC motors, and not wanting to reverse their directions, and they each draw no more than 2 A, you are all set: just add an external 12 V DC power supply capable of supplying at least 4 A.
If you want to reverse the motors, you must use an external reversing relay for each motor and dedicate two of the relay outputs to drive these reversing relays, using four of your six available relay outputs. Don't forget to add diodes for relay contact protection.
If the motors require more than 2 A, use external relays with appropriate contact ratings, in which case you may choose any DC or AC coil voltage you desire for those relays, replacing the CPU222 external relay power supply with whatever is appropriate for your external relays. I would take this approach even if the DC motor current is within the 2 A range of the on-board PLC relays because it is easier to replace an external relay that fails due to a fault condition than the relays in the PLC.