P has a greater mass but it is less affected by air resistance because it has more inertia. Think about throwing a feather vs throwing a bowling ball. The horizontal acceleration of both without air resistance is 0. But since P is less affected by air resistance, it will be decelerated less than Q, so it will travel a greater horizontal distance.