Commercial Fixed Wing
Flight Crew Air Transport Pilot (ATP); Flight Crew Instrument; Flight Crew Multiengine
Flight Crew Last 90 Days 70
Communication Breakdown; Distraction; Situational Awareness; Time Pressure
ATC Issue All Types; Conflict NMAC; Deviation / Discrepancy - Procedural Clearance
Air Traffic Control Issued Advisory / Alert; Flight Crew Became Reoriented; Flight Crew FLC complied w / Automation / Advisory; Flight Crew Took Evasive Action
Human Factors; Environment - Non Weather Related; Aircraft
Tower gave us a clearance for takeoff and gave us an advice of a traffic on the left side. We had a TA (traffic advisory) but also we had visual contact with the aircraft. By the time we changed frequencies Departure was already asking 'Aircraft X are you up?' I answered; 'Yes; Aircraft X leaving 2000 for 3000 feet.'  ATC gave us; 'Turn left heading 150 and expedite your turn. You have traffic.'  Simultaneously; the First Officer responded to an RA and leveled off around 2600 feet and continued to expedite the turn. The traffic was at 500 feet above us on the right side. After clear of conflict ATC gave us multiple headings and altitudes to back on course. We had the feeling that ATC did not inform us about the second traffic and there was no way to avoid an RA; since we were in between the two conflicting aircraft. From our stand point an RA was unavoidable because the proximity to both aircraft.  ATC should have delayed our takeoff or assigned a heading to avoid the conflict.
Air Carrier Pilot Crew reported a NMAC and RA after takeoff.