Hello there!
The first key evidence that proves chloroplasts and mitochondria were primitive prokaryotes is the presence of a double membrane. When chloroplasts and mitochondria were floating around as prokaryotes, they were engulfed by another prokaryote, hence the double membrane.
Another key evidence is the fact that chloroplasts and mitochondria replicate their own DNA, transcribe their own RNA and make their own proteins and enzymes! Note that the mitochondria/chloroplasts' DNA is separate from the cell's DNA.
This is again related to the fact that chloroplasts and mitochondria were once prokaryotes that went through the central dogma of DNA to RNA to protein, host cell or not!
These two pieces of evidence supports the endosymbiosis theory. Endo- means "within" and symbiosis is a type of relationship between two organisms. So endosymbiosis is a relationship between an organism that lives inside another organism! In this case, mitochondria/chloroplasts that "live" inside the current eukaryotic cell!
This is a great question to ask! Hope my answer has been sufficient :)