“Trio” is episode sixteen of season four of Stargate: Atlantis.
Drs. Keller and McKay, along with Colonel Carter, are on a mission to convince a mining colony that they need to move due to unhealthy and unsafe living conditions.
On the way there, Rodney falls down into an abandoned Genii mining complex. Before they can get help, the other two also fall in.
The room they are in is on weakened supports over a chasm. Given the regular tremors in the area, they need to escape before it falls in.
An episode mostly about the interactions between these three. Dr. Keller does, in some ways, resemble Rodney in her behaviour. Rodney also has a long standing and unreturned crush on Samantha Carter. Not surprisingly, all their initial attempts at escape fail to work out.