Huh? They can, and will, just add the things they want to the rest api of the microservice A and then call them from B. That doesn't change with microservices.
Look up a thing called "distributed monolith".
Look up a thing called "distributed monolith".