An accelerating and shrinking train in special relativity Suppose when a train is at rest, it has a length of $L$.  Let the position of the back of the train at any time be $A$, and let the position of the front of the train at any time be $B$. 
Now assume a stationary observer on the Earth, O, observes point $A$ to be accelerating at a constant rate, $k$.  Now as the train accelerates, O will observe the train to continually shrink, thanks to length contraction.  Now since $A$ is measured to accelerate at a constant rate, the position of $B$ will depend on A's acceleration, and the rate of shrinkage.  
So the question is, calculate the acceleration of point $B$, as measured by O, given the acceleration of point $A$, and the length of the train, $L$.
 A: 
Suppose when a train is at rest, it has a length of $L$. Let the position of the back of the train at any time be $A$, and let the position of the front of the train at any time be $B$.

In other words, by definition, $B$ and $A$ initially find equal ping durations  between each other; 
$T_{ABA} == T_{BAB} := T$, where $L := \frac{c}{2} T$.

Now assume [...] point $A$ to be accelerating at a constant rate, $k$.

The prescription of "constant acceleration" is conveniently modelled as "constant proper acceleration" corresponding to hyperbolic motion against participants (such as "O") who were initially at rest wrt. $B$ and $A$ and each other (and who remain at rest to each other, as a inertial frame, allowing them to measure, among each other, the relevant distances and durations):
$x_A[ t_O ] - x_A[ t_{O\text{start}} ] :=  \frac{c^2}{k} \left( \sqrt{ \left(\frac{k}{c} t_O\right)^2 + 1 } - 1 \right)$,
where the relation between the duration $t$ of members of the inertial frame (incl. participant "O"), from starting $A$ until the passage of $A$ at some particular member of the inertial frame, and the correponding duration $\tau_A$ of $A$, from being sent off until passing the particular member of the inertial frame as
$\frac{k}{c} t_O = \text{Sinh}[ \frac{k}{c} \tau_A ]$; and therefore
$x_A[ t_O ] - x_A[ t_{O\text{start}} ] :=  \frac{c^2}{k} \left( \text{Cosh}[ \frac{k}{c} \tau_A ] - 1 \right)$.

[...] calculate the acceleration of point $B$, as measured by O, given the acceleration of point $A$, and the length of the train, $L$. 

The prescription of the length of the train being and remaining "given" is sensibly modelled as the ping duration remaining constant; at least for pings of $A$ to $B$ and echoed back to $A$, (if not the other way around as well); i.e.
$\tau_{A\text{echo reception}} := \tau_{A\text{signal statement}} + T$.
The exchange of pings is considered exchange of light signals; therefore for the corresponding distances and durations determined by the members of the inertial frame holds:
$c := \frac{(x_B[ t_{O\text{reflection}} ] - x_A[ t_{O\text{signal}} ]) + (x_B[ t_{O\text{reflection}} ] - x_A[ t_{O\text{reception}} ])}{t_{O\text{reception}} - t_{O\text{signal}}}$, i.e.
$\text{Sinh}[ \frac{k}{c} (\tau_{A\text{sign}} + T) ] =$
$2 \frac{k}{c^2} \left(x_B[ t_{O\text{refl}} ] - x_A[ t_{O\text{start}} ]\right) - \text{Cosh}[ \frac{k}{c} \tau_{A\text{sign}} ] - \text{Cosh}[ \frac{k}{c} (\tau_{A\text{sign}} + T ) ] + 2$.
Also:
$c := \frac{(x_B[ t_{O\text{refl}} ] - x_A[ t_{O\text{sign}} ])}{t_{O\text{refl}} - t_{O\text{sign}}}$, i.e.
$\frac{k}{c} t_{O\text{refl}} - \text{Sinh}[ \frac{k}{c} \tau_{A\text{sign}} ] =  \frac{k}{c^2} \left(x_B[ t_{O\text{refl}} ] - x_A[ t_{O\text{start}} ]\right) - \text{Cosh}[ \frac{k}{c} \tau_{A\text{sign}} ] + 1$.
Solving for $x_B[ t_{O\text{refl}} ]$ (along with $\tau_{A\text{sign}}$) results in
$x_B[ t_{O\text{refl}} ] - x_A[ t_{O\text{start}} ] = \frac{c^2}{k} \left( \sqrt{\left(\frac{k}{c} t_{O\text{refl}}\right)^2 + e^{(\frac{k}{c} T)} } - 1\right)$, i.e.
$x_B[ t_{O\text{refl}} ] - x_A[ t_{O\text{start}} ] = \frac{c^2}{k} \left( \sqrt{\left(\frac{k}{c} t_{O\text{refl}}\right)^2 + e^{(2 \frac{k}{c^2} L)} } - 1\right)$.
This corresponds to hyperbolic motion of $B$ with proper acceleration $k \, e^{(\frac{-k}{c^2} L)}$.  
However, this solution doesn't hold for arbitrarily small/early $t_{O\text{refl}}$, but only for its values corresponding to $\tau_{A\text{sign}} \ge 0$, i.e. for ping signals which $A$ had stated at or after having started to accelerate. This applies for 
$t_{O\text{refl}} \ge \frac{1}{2} \left( e^{(2 \frac{k}{c^2} L)} - 1\right)$.
Determining even earlier motion of $B$ (corresponding to pings stated by $A$ before starting to accelerate and with echoes received by $A$ after the start) may be more complicated ... but at least numerically possible (and sensible).
But it doesn't appear in turn that the ping duration of $B$ (from stating the signal to observing the echo from $A$) remains constant and equal to $T$.

Now as the train accelerates, O will observe the train to continually shrink, thanks to length contraction.

Well ...
Using the above equations of hyperbolic motion, of $A$ corresponding to the setup prescription, and of $B$ obtained accordingly as solution for containt ping duration $T_{ABA} := T$, it is possible to express the distance between any pair of members of the inertial frame (with O) whose indications of having been passed by $A$ and by $B$, respectively, were simultaneous:
$x_B[ t_{O\text{refl}} ] - x_A[ t_{O\text{refl}} ] = \frac{c^2}{k} \left( \sqrt{\left(\frac{k}{c} t_{O\text{refl}}\right)^2 + e^{(2 \frac{k}{c^2} L)} } - \sqrt{ \left(\frac{k}{c} t_{O\text{refl}}\right)^2 + 1 } \right)$.
This quantity is always positive, but is monotonously falling as a function of $t_{O\text{refl}}$.
In particular, for $e^{(2 \frac{k}{c^2} L)} - 1 \ll 1$, $e^{(2 \frac{k}{c^2} L)} \lessapprox 1 + 2 \frac{k}{c^2} L$:
$x_B[ t_{O\text{refl}} ] - x_A[ t_{O\text{refl}} ] \approx \frac{\frac{k}{c^2} L}{\sqrt{ \left(\frac{k}{c} t_{O\text{refl}}\right)^2 + \, 1 }} := \frac{k}{c^2} \frac{L}{\gamma[ t_{O\text{refl}} ]}$.
Of course, this relation holds because the train does not itself shrink, but maintains the "given length" $L$ at least as far as the ping duration $T_{ABA}$ remains constant. 
