How to calculate the equilibrium composition after a change in partial pressure of one component? Question
  Ammonium carbamate dissociates as shown below. 
  $$\ce{NH2COONH4 (s) -&gt; 2NH3 (g) + CO2 (g)}$$
  In a closed vessel containing ammonium carbamate in equilibrium with ammonia and carbon dioxide, ammonia is added such that partial pressure of $\ce{NH3}$ now equals to the original total pressure. What is the ratio of the new total pressure to the original pressure?


I tried solving the problem and I know I am quite close to the answer which is $\frac{31}{27}$. 
Firstly I took out $K_p$ for equilibrium assuming total pressure to be $p$.
So,

$K_\mathrm{p} = \left(\frac{2p}{3}\right)^2 \times \frac{p}{3} = \frac{4p^3}{27}$

After this the par pressure of ammonia becomes $p$ so let's say that of $\ce{CO2}$ is $\frac{p}{3} + x$.

Now since $K_\mathrm{p}$ doesn't change so:

$\frac{p}{3} + x = \frac{4p^2}{27}$ (cancelling one of the $p$)

But solving further and finding new pressure and dividing by the old one doesn't give the answer
As follows:

Just to simplify the math a little bit, assume pressure of $\ce{CO2_{(g)}}$ is p. Thus, pressure of $\ce{NH3_{(g)}}$ is 2p at equilibrium. Total pressure in this case is 3p. 

Let 3p equal new pressure of $\ce{NH3_{(g)}}$.

Added pressure of $\ce{NH3_{(g)}}$ would shift the equilibrium to the left, so say we lose 2x pressure of $\ce{NH3_{(g)}}$ and x pressure of $\ce{CO2_{(g)}}$. New equilibrium pressures will be 3p-2x for $\ce{NH3_{(g)}}$ and p-x for $\ce{CO2_{(g)}}$. Thus, ratio of new to old is $\frac{4p-3x}{3p}$. You can solve for x in terms of p using $K_p$.

Solve for x and find the ratio, which should be $\frac{31}{27}$