2-3 billion years ago, prokaryote predator and prokaryote meal made a eukaryote. Maybe kind of like a traditional bachelor guy being consumed by a bachelorette lady. He transfers all his domestic chores to her in order to focus just on providing an income. The purple bacteria (meal) transferred nearly all its annoying DNA management tasks to the host in order to focus just on making NADH and FADH and using these, instead of sunlight, to drive a H+ gradient to fuel ATP synthase.
Mitochondria are foutnd in eukariotic life, but he DNA and RNA are prokariotic type. As other people mentioned, several billion years ago, a kind of cyanobacteria was incorporated into the eukariotic cell, and bigun to live together with the host eukariotic cell, namely symbiosis. Read following articles!
Symbionticism revisited: a discussion of the evolutionary impact of intracellular symbioses.
Taylor FJ.
Proc R Soc Lond B Biol Sci. 1979 Apr 11;204(1155):267-86.
PMID: 36627
Symbiotic theory of the origin of eukaryotic organelles; criteria for proof.
Margulis L.
Symp Soc Exp Biol. 1975;(29):21-38. Review.
PMID: 822529
PLoS One. 2014 May 7;9(5):e96566. doi: 10.1371/journal.pone.0096566. eCollection 2014.