![enter image description here](https://i.stack.imgur.com/8y7dY.png)

$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?