Let the density be d for both the planets.
Given that RA=2RB
Now, mass of A,MA=34dπRA3=332dπRB3
similarly, MB=34dπRB3
Escape velocity for a planet is given by V=R2GM
So, VA=3RA2GMA=6RB64GdπRB3 =332GdπRB2
Similarly, VB=38GdπRB2
Taking the ratio, VBVA=332GdπRB2×8GdπRB23 =2