Advice please

Idk if this is even the right topic to post this in but I need some serious tips and I’m not asking for anything or negative. Just help. How in the heck do you handle a child that doesn’t fucking listen?! Someone please tell me. We have my boyfriend son this weekend who already doesn’t listen. But he does when we try to correct him. However we also have his nephew and he don’t fucking listen at all. I mean not the fuck at all and honestly I’ve had about enough! We go to McDonald’s he flops all over the floor and won’t stay seated. I tell him not to do something and he does it worse. How do you correct a child that isn’t yours or make them listen to you! He’s 3.