You could make an analogy between the pressure distribution of a sound wave and the mass density distribution of a realistic spring undergoing vibrations, but it wouldn't give you the explanation you're looking for. As a matter of fact, that would be more like explaining a sound wave in terms of springs, rather than what you're trying to do, i.e. explaining a spring in terms of waves.
Although I'm not intimately familiar with the details, basically what goes on at the microscopic level of a spring is that, when the spring is at equilibrium, the atoms are set in some sort of rigid structure. Any given pair of atoms has a potential energy which is a function of the distance between those two atoms, so the entire spring has a potential energy determined by all the distances between every possible pair of atoms:
$$U = \sum_{i,j} U_{ij}(r_{ij})$$
In equilibrium, the spring will take a shape which minimizes this total potential energy.
If you think about it, a metal spring might typically be formed by heating some metal to make it malleable (or even melting it), and then forming it into the desired shape before it cools. The heat allows the atoms to move around relatively freely so that they can reach the equilibrium configuration that minimizes their potential energy, then once the spring cools, they are frozen in place.
Of course, the atoms are not completely frozen in place. As I see that Georg has already written in his answer, the potential energy between two atoms ($U_{ij}(r_{ij})$) has a minimum at their equilibrium distance and goes up on either side. If you add some energy into the system, say by exerting a force on it, you can get the atoms to move closer together or further apart. When you stretch or compress a string, you are really just doing this to all the (pairs of) atoms in the spring simultaneously. The atoms will, of course, "try" to return to their equilibrium position, i.e. they will "try" to minimize their potential energy, and this is what you feel as the restoring force of a spring under tension.
Force on the upper weight consists of there components:
- Gravity $mg$
- Tension of upper spring $F=-k(l-(l+x_1))=-k x_1$
- Tension of middle spring $F=k(\lambda-l)=k(x_2-x_1)$ where $\lambda=(2l+x_2)-(l+x_1)$ is actual length of middle spring.
Second weight is done similarly.
To understand the problem better you'd better make a drawing of the system and forces acting on each component.
Best Answer
In a sense yes, if you're very careful about what you're holding constant. Stating that a variable is proportional to another variable implies that all other relevant quantities are being held constant.
For example, there's a simple relation $d=vt$ that describes the distance $d$ something travels in a time $t$ when traveling at speed $v$. One might say that $d$ is proportional to $t$. However, this relation is only valid if the speed $v$ is constant throughout the interval $t.$
In your example, one could say that mass is proportional to displacement if the $k$ and $a$ are constant, but you will need to do some work to figure out what physical system(s) meet such requirements.