The given sentence is a complex sentence. A complex sentence consists of an independent clause and one or more dependent clauses. In this case:
- Independent clause: "After Sanvi and Kashish left on the metro"
- Dependent clause: "they realized that their friend Rani was not with them."
The combination of these clauses forms a complex sentence because it includes both an independent clause that can stand alone as a complete sentence and a dependent clause that cannot stand alone.