this sounds simple, but probably it is not...
because on phone B there must be some service running in the background, which listens for some event, this could be for example a change of a database value
a simple solution could be to just use the PhoneCall component to start a phone call or send a message via WhatsApp, How to start Whatsapp/send a message with Whatsapp
alternatives:
probably Tasker is able to help?
or the background tasks extension?
Taifun
Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by
Taifun.