We let this common skill within a firm be represented by q. Use the second equation to solve for k, and substitute the result into the first equation. Another firm that chooses workers with any other value of q must also observe a equation like this. The above equation, which is true for all q, is a differential equation in q. Small differences in q translates into large differences in w. Good firms hire good workers and pay high wages.
Bad firms hire bad workers and pay low wages.
It is an equilibrium situation to have heterogeneous firms hiring workers of different quality and producing products of different quality. Good workers are matched to good workers, and bad workers are matched to bad workers in equilibrium. You don't see high-power law firms hiring cheap secretaries because a slight typing mistake might cause the firm millions of dollars. Positive assortative matching explains the observed positive correlation of wages among workers working in the same firm. Firms do not just offer a wage function and hire whoever comes forward.