what? when? where? how and why?
You've seen the blank points ending of BBS, right?
Spoiler ShowEraqus's heart is inside Terra's. And Terra's heart is possessed by Xehanort, of course.
Xehanort's heartless - Ansem SoD was made when Apprentice Xehanort (aka amnesiatic Terranort) fell to darkness as an apprentice of Ansem. Theoretically, this means that Terra's heart is inside Ansem SoD as well, it's just completely consumed and possessed by Xehanort's heart. And Ansem SoD was the one that possessed Riku. And quite honestly, it's very possible that Ansem SoD picked Riku because of his connection with Terra. I can easily see Ansem SoD going on and on to Riku about him being his "chosen one" or something like that in KH1.
Bouncing off of this, I believe the theory is that when Ansem SoD was stripped away from Riku's heart (the data explosion thing in KH2 I think?) that Terra's heart could very well have clung to Riku's. I don't like that idea very much, because the idea of housing hearts is getting a bit grating on me, given the ridiculous amount of people Sora's housing in his own heart. I agree with someone on here who has this statement as part of their sig: "Sora's going to have to start charging rent." (No kidding, he seriously should, lol.)
But I've been mulling over the idea of what could happen if maybe Riku just had part of Terra's heart in him: more specifically, the memories in Terra's heart. It could be triggered somehow in KH3D, and Riku suddenly starts pulling freudian slips that are really Terra's own memories, similar to Cloud in FFVII (only he'd realize what was going on faster than Cloud did (the memories not being his)). I say only the memories in Terra's heart, simply because the memories could have recognized it was Riku's heart it was clinging to alongside fragments of Ansem SoD, and it clung to Riku when the fragments of Ansem SoD was stripped clean away in KH2.