Skyhawk 172/Cutlass 172
Flight Crew Commercial; Flight Crew Flight Instructor; Flight Crew Instrument
Flight Crew Last 90 Days 150; Flight Crew Total 1100; Flight Crew Type 700
Conflict NMAC
Flight Crew Took Evasive Action
Human Factors
While doing pattern work at ZZZ; we (Aircraft X) noticed an aircraft on our TCAS system perform a pattern entry directly across the departure end of Runway 20 (the runway in use at the time) at approximately pattern altitude. We spotted that aircraft visually and verified their altitude and location. That aircraft proceeded to fly their downwind between 100-200 yards behind us. We slowed down on downwind and then elected to extend downwind for an aircraft performing a practice ILS approach. The Skywagon (Aircraft Y; confirmed with ADS-B and audibly on CTAF); lost visual separation with us and turned base nearly on top of us; after slightly widening out their downwind. We evaded each other and then continued pattern work.
C172 flight instructor reported a NMAC [Near Miss Airborne Conflict] with following traffic which failed to maintain visual separation in traffic pattern.