As Mark wrote, your reasoning is (almost) correct and your friend's is not. Here's the sort of explanation I use when I'm teaching this topic:
In order to apply Newton's second law, you need to choose one object to apply it to. Ignore everything else except the object you choose and the forces that act on it. In your case, the problem asks about a force exerted on the bottom mass, so you should write out Newton's second law for the bottom mass.
There are exactly three quantities that go into the equation:
Mass of the object
This is given in the problem. (Typically the mass is given.)
Acceleration of the object
This is also given in the problem. (In most cases, it is either given or it is what you will be solving for.) When you are determining acceleration, only consider how the object is changing its velocity. Gravity is irrelevant, the value and direction of velocity are irrelevant, whether the object is slowing down or speeding up or curving is irrelevant. The problem tells you that the elevator is accelerating at $5\ \mathrm{m/s^2}$ upward, so the only thing you need to assume is that the mass is moving along with the elevator, and that means the acceleration of the mass is $a = 5\ \mathrm{m/s^2}$ (assuming positive values are upward).
Net force on the object
This is usually the part of Newton's law that takes a bit of thought. You have to enumerate each of the forces acting on the object and include the correct term for each one. In this case, there are two forces acting on the object (which is the lowest mass): the force exerted by the spring above, and gravity. The spring force goes up and gravity goes down, so you would write the net force as $F_s - F_g$, or $F_s - mg$ once you plug in the value of the gravitational force.
Note that each of these terms represents a force on the object. $F_s$ is the force that the spring exerts on the mass; $F_g$ is the force that the Earth exerts on the mass. The problem asks for the force that the spring exerts on the mass, so you do not need to invoke Newton's third law in this case.
Once you have all these quantities, you can put them into the equation
$$\sum F = ma$$
and solve for whatever you need to.