Robert’s answer is the right approach, but it would usually be better to have app B provide the rest service. This way you’re not limited to only one app A, but you can have multiple, as app B has no dependency on app A.
For example:
If app B allows a user to create a support ticket, and you want users to be able to prefill some fields in the ticket when opening the create ticket page, e.g., have a deeplink like http://mydomain/p/createTicket?company=CompanyA&contact=MyName.
App b can provide a REST/OData service where app A can create a new ticket with a rest call. The response would return the ID of this ticket, and then you can open the edit ticket page with this ID using a normal page url, http://mydomain/p/editTicket/{ID}
You could implement a REST service on App A. All the data you need App B to be able to access you can make available on this REST service. Pass a key over to App B in the Deeplink, and App B can use this key to retrieve all the data it needs from App A’s REST service.
Hope this helps.