The screen will then split in two, and you will be able to see what the other player is doing. Once your friend joins your game, all they have to do is press the start button on the second player controller. Find the friend you want to play with, and send him/her a remote-play invite. Once the gameplay started, open the steam overlay. Fire up your game and start the campaign. Some other titles do support mouse and keyboard, but Capcom was just lazy I guess. Quick note, you can't play using a mouse and keyboard for this. (Xbox controllers work best, but you might try different models to see if it works for you).
For this, both you and your friend must have a controller plugged into their respective PC's.
It's just not very clearly explained in the game. Actually, there is a way to play 'online' coop in the campaign.