Another man in his 20s was arrested over the incident which happened at about 00:20 local time on Sunday.
Those injured were the driver of the first car and a passenger from the second car.
They were taken to Tallaght Hospital and St James’s Hospital.
The scene of the collision in the west of the city was cordoned off for a forensic examination.
Gardaí have appealed to witnesses to come forward.
“Any road users who may have camera footage (including dash-cam) and were travelling on the Naas Road or in the Red Cow area between midnight and 12:45am are asked to make this footage available to Gardaí,” a spokesman said.
The arrested man is being https://belakangan.com detained at a garda station in south Dublin.