W weightN normalP pushf friction
Draw the object alone and every force that acts on it, each as an arrow from where it acts. This box has four: its weight pulling down, the floor pushing up (normal force), your push, and friction resisting the slide. Split them into directions and add them up. Vertically they cancel, because the box doesn't sink or float. Horizontally the push beats friction, and what's left over accelerates the box: P − f = m·a.