The website I'm working on has two sub domains a.example.com and b.example.com, they are hosting different content and have their own databases, but share the same set of users. Now I need to create a user profile page including the user's activities on both sub domains. For example, a block with a list of blog he posted on domain a.example.com, and a block with the events the same user posted on domain b.example.com.

Looking into tutorials for block, panel, and views, it seems straightforward if all data are from the same database, but I'm not sure if this is doable for my case. I also looked some posts where people talk about using iframe to mashup data.

My question for experienced developer: What would be a better way to do it?

It looks like creating a custom module might be the simplest way. I found following discussion is helpful:
http://stackoverflow.com/questions/4042366/create-an-iframe-from-a-drupa...