Look under the sinks up there and see if you have a plastic mushroom looking piece. That is the vent on each bathroom. If it’s bad then that’s where you find them. They are called studor vents. If you don’t have them then your vent goes up through your roof.
If it’s water pressure on the water lines then it will only happen right when water is turned off or on. That would be called “hammering”.