My friend gave me their roku Express but their account is still on if I factory reset it on their account on my tv will it affect their account on their own tv?
A Factory Reset, performed on your newly acquired Roku, will wipe settings from that particular unit so it will no longer be able to connect to the current Roku account it is linked to. You'll be setting it up again as if it were new-out-of-the-box, and during the process you'll link to your own Roku account.
This will have no effect on your friend's Roku account to which it is currently linked.
A Factory Reset, performed on your newly acquired Roku, will wipe settings from that particular unit so it will no longer be able to connect to the current Roku account it is linked to. You'll be setting it up again as if it were new-out-of-the-box, and during the process you'll link to your own Roku account.
This will have no effect on your friend's Roku account to which it is currently linked.