The question states that all friction forces are to be ignored. This implies that all contact forces are normal to the common surface of contact. Any component of force parallel to the contact surface would not be resisted and would result in motion. The question states that the ladder is held in place, which implies that all such motion has ceased and the parallel forces are now zero.
It is not clear what direction the normal to the corner of the box is pointing in, because angular corners are discontinuous - the normal changes abruptly from horizontal to vertical. However, the normal to the ladder is the same at all points along its length, so we must assume that this is also the normal to the common surface is a segment of the ladder.
More realistically we could imagine that the corner is rounded with a very small radius of curvature. The contact surface will be tangent to this arc and parallel to the ladder.
In reality a sharpan angular corner will exert a very high pressure on the wood of the ladder, biting into it and allowing aso that any component of a force parallel to the ladder towill be resisted by a friction force. This possibility has been excluded here by using an ideal model in which there is no friction - ie no resistance to forces which are parallel to the common surface.
In some ideal models the direction of the surface of contact cannot be determined. For example, the collision between 2 point masses in 2D or 3D. The indeterminacy can be resolved by making the points into circles or spheres with a given radius, so that the collision forces can be resolved along a common normal at the point of contact.