It depends entirely on what domain B offers. If you don't control domain B and we don't know what domain B is, then we can't help you with specifics. However, generally, domain B would have to provide data fitting one of these requirements:
- A JSON-P service
- The ability to be read by YQL
JSON-P is easy — either website B provides it or it doesn't. Chances are it doesn't, since you're asking here.
YQL is a bit more convoluted. You need to authenticate with the YQL service itself, but then you make a database-like query to them, their servers scrape domain B, and then return the results to you in XML or JSON format. This will be a bit of work on your part (and may not be possible, depending on how domain B is structured) — this article does a good job of explaining the principles.