How to use an app on the laptop and phone at the same time

I have tried to do this but the app I am using it logs me out I know someone who does this but they won’t tell me how.

I am trying to run a task on the laptop and do something else on the phone at the same time.