Charge distribution on plates 
$A,B,C$ are $3$ identical metallic plates.
Initially, charges $Q$, $4Q$ and $2Q$ were given to $A$,$B$ and $C$ respectively. Find final charge distributions when $B$ was earthed and $A$ and $C$ were connected with a conducting wire.
My attempt :
Using charge conservation on $A$,$C$
$$q_3-q_1-q_2+q_4=3Q $$
Electric field is zero inside each of these(give same equation) :
$$q_3=q_4$$
Also.$$V_{AB}=V_{CB}$$ $$\frac{q_1d}{A\epsilon_0}=\frac{2q_2d}{A\epsilon_0}$$ $$ q_1=2q_2$$
I know now I have to use the fact that potential of $B $ is earthed and at $0V$, but I can't seem to frame that into an equation. Any help will be appreciated. Sorry for the dirty diagram.
Edit :  Please tell if my way is correct :
We can use the fact that potential is zero at infinity as well as $B$. Let a point $P$ be $x$ distance left from $A$.
Then,
$$V_{BP}=V_{BA}+V_{AP}$$
$$\frac{2q_1d}{A\epsilon_0}+\frac{q_3+q_4}{A\epsilon_0}x=0$$
$$q_3+q_4=\frac{-2q_1d}{A\epsilon_0 x}$$
As $q_1=0$ will violate charge conservation, we can say that as $x\to\infty$, $q_3+q_4\to 0$. Hence, $q_3+q_4=0$ in an additional constraint which enables us to solve all the four variables. Am I right?
 A: You start with a total of $3Q$ on the outer plates - and that charge has nowhere to go. So when you connect the two plates together, they will share the charge equally, and have a net charge of $1.5Q$ on each. Grounding the center plate means that charge can flow freely. So what will happen? 
First - charge will flow between plate B and ground. The boundary conditions are:


*

*Potential of A and C will end up being the same (they are connected)

*Potential of B will be zero (it is grounded)

*Charge will distribute according to the capacitance. Since
$$Q=C.V$$
and
$$C=\frac{k \epsilon_0 A}{d}$$
We find


$$\frac{Q_1}{C_1}=\frac{Q_2}{C_2}$$ or $$Q_1d_1=Q_2d_2$$
We also have 
$$Q_1 + Q_2 = 3Q$$ 
So given that
$$d_2=2d_1$$
it follows that the charge on the inside of the plates is
$$q_1 = 2Q\\q_2 = Q$$
The plate B will accumulate a charge of $-3Q$ in order to exactly cancel the $3Q$ charge on the outer plates. Why? Well - if there is a residual charge, there will be an electric field. Electrons "in the ground" will either be pulled towards the plates (if net charge is positive) or repelled (if it is negative). Their movement will adjust the charge on plate B until there is no field - at that point, there is no energy to be gained by charges moving. You have reached equilibrium. 
When all is done, the charge distribution will be:
$0$ on the outside of $A$ and $C$
$2Q$ on the inside of $A$
$Q$ on the inside of $C$
$-2Q$ on the left side of $B$
$-Q$ on the right side of $B$
The net charge on the system is zero. Thus
$$\nabla E = 0$$
which implies that the surface charge on the outside of the plates must also be zero.
A: As an idealization if plates are assumed to be infinite in extent there is no field between A and C since they are both positively charged and connected. So q1=q2=0, and q3=q4=3Q/2. 
Using your equations we get the same result. Grounding means q1+q2=0, so the same conclusion. 
A: Actually, $B$ wouldn't stay at $0V$ since the other plates would induce a charge on $B$. 
Since you have $q_1 = 2q_2$, you should be able to figure out the charge distribution on $A$ and $C$.
