When you say it "pulls data" from B, exactly what is going on? Import? Viewing records through a portal? Running a script that sets fields to related values?
Those details will help us diagnose the issue, but I would make sure the GUEST account actually has the correct privileges to read the data. That'd be the first place I'd look.
the script is copying several fields from B into new records on A. The new data is displayed in portal as well as reference static data from B. I checked the security and though I didn't change anything it is now working....