It's a good question, and illustrates an important principle in relativity. The proper time of an observer is equal to the length of their world line.
For any observer the time shown by the clock they carry is called the proper time, and the proper time is an invariant i.e. all observers in all frames of reference will measure the proper time to have the same value. So the elapsed time for observer $A$ on the planet is just the time shown on $A$'s clock, and the elapsed time for observer $B$ in the rocket is just the time shown on $B$'s clock. The task is to calculate these times and find the difference between them.
The way we do this is to choose a convenient coordinate system and calculate the length of the world lines for the two observers. The length of the world line has to be calculated using the Minkowski metric:
$$ c^2 d\tau^2 = c^2dt^2 - dx^2 - dy^2 - dz^2 \tag{1} $$
Where $\tau$ is the proper time.
We'll use observer $A$'s coordinates. Since $A$ is an inertial observer this makes life simpler. Since $B$ starts at rest wrt $A$ both $A$ and $B$ share the same inertial frame and can synchronise their clocks. So we'll assume that both $A$ and $B$'s clocks are set to zero at the moment $B$ starts accelerating.
In $A$'s coordinates $B$ starts accelerating at $t = 0$ and reaches $A$ at $t = T$. First we calculate the length of $A$'s world line, and since in $A$'s coordinates $A$ isn't moving we have $dx = dy = dz = 0$, so for $A$ equation (1) simplifies to $d\tau = dt$. So for $A$ the proper time between $B$ starting to accelerate and $B$ reaching $A$ is just:
$$ \tau_A = \int_0^T dt = T $$
Sadly, this is the only easy bit of the calculation. What we need now if $B$'s trajectory expressed in $A$'s coordinates. We can arrange the axes so that $B$ travels along the $x$ axis and we can ignore the $y$ and $z$ coordinates. In that case $B$'s position, $x$,will be given by an equation of the form:
$$ x = f(t) $$
and therefore:
$$ dx = f'(t) dt $$
and we substitute this in equation (1) to get:
$$ c^2d\tau^2 = c^2dt^2 - f'^2(t) dt^2 $$
and with a bit of rearrangement we get the equation for $B$'s proper time:
$$ \tau_B = \int_0^T \sqrt{1 - \frac{f'^2(t)}{c^2}} dt \tag{2} $$
Now we can't evaluate this because you've been coy about exactly how $B$ accelerates and wihout knowing that we don't know the form of the function $f$. Incidentally, you can't say $B$ accelerates instantly because that would make $f'$ infinite and the equation would become singular and can't be integrated. You'd need to choose some sensible function of time for the acceleration.
However we can say that $\tau_B \lt T$ i.e. that $B$ experiences less time than $A$. That's because the expression $\sqrt{1 - f'^2(t)/c^2}$ is always less than or equal to one, so integrating must give a value for $\tau_B$ that is less than or equal to $T$.
There is one special case we can easily do, and that is to assume $B$ was already moving at velocity $v$ at time zero i.e. $B$ didn't have to accelerate. In that case the function $f'(t)$ is simply $B$'s velocity, $v$, and equation (2) becomes:
$$ \tau_B = \int_0^T \sqrt{1 - \frac{v^2}{c^2}} dt $$
And since $B$'s velocity, $v$, is constant this immediately integrates to give us:
$$ \tau_B = \sqrt{1 -\frac{v^2}{c^2}} T $$
which should be instantly recognisable as the equation for the time dilation of an object moving at constant speed $v$.