This paper develops a simple framework to characterize the distribution of income and wealth in a real business cycle model. Agents are of two types depending on the human factor of production they own and they are located in separated markets, cities. In each city the two types of agent match to produce a composite factor, human service. We show that if the population is an exchangeable sequence of agents' types generated according to a Pòlya urn then (i) the share of agents' type follows a Beta distribution and (ii) the functional form of the matching function belongs to the family of the constant elasticity of substitution, with agent shares that depend on the composition of the population. We nest this structure into a standard Bewley economy, in which the aggregate supply of human service is combined with physical capital to produce the homogeneous output. Given the results (i)-(ii) we perform the exact aggregation of income, consumption and asset holding across agents, leading to the solution of the real business cycle model with heterogeneous agents. Our framework predicts that the theoretical distributions of income and wealth are known real valued transformations of a Beta distribution. This result provides a simple way to characterize the equilibrium of macroeconomic models with heterogeneous agents.