Variation of Heron's problem (maximize absolute difference of distances) Given two points $A(4,1)$ and $B(0,4)$, find a point $P(x,y)$ on the line $ l_1: 3x-y-1=0$, so that $abs(AP-BP)$ is the maximal possible [the absolute value of the difference between the distances from A to P and from B to P].
Such a point $P (2,5)$ belongs to the line $l_2: y=-2x+9$  where also the points $A(4,1)$ and $B'(3,3)$ are placed. The latter is the reflection of $B(0,4)$ below the line $l_1$.
Apparently $BP$ and $B'P$ are equal and offset each other in the difference of interest. So, it is $B'A$ that represents the absolute difference of distances $AP$ and $BP$.
How to prove that with $P$ that belongs to the line $AB'$ the absolute difference of distances $AP$ and $BP$ is maximized?

 A: Let us have a global geometric understanding of the issue with a reasoning that will explain in a natural way the occurence of point $B'$.
The fundamental fact is that the locus of points $M$ such that $|AM-BM|=k$ where $k$ is a given positive constant is a hyperbola $H_k$ with $A$ and $B$ as its foci. 
The following figure displays some of these hyperbolas (for $k=1$ to $3$ with step $0.2$): 

Fig. 1 : Each hyperbola has two branches : black (resp. green) branch corresponds to $AM-BM=k>0$ (resp. $-AM+BM=-k<0$) where $k$ can take any positive value. 
If $M$, besides, is constrained to belong to a certain curve (here the straight line $(L)$ in red), this will possibly impact the range of possible values for $k$. This is clearly the case here, where the little black circle indicates the point $M$ which corresponds to the maximal value of $k$, approximately $k=2.2$ corresponding to the awaited point $P_{max}=(2,5)$. Please note that in this point, the straight line $(L)$ is tangent to hyperbola $H_k$. 
But it is known (See this) that such a tangent in $M$ bisects angle $AMB$ between the lines to the foci. Therefore, let us define point $B'$ as the symmetrical point of $A$ with respect to tangent $(L)$ : necessarily $B'$ belongs to line $MA$. 
Remark : please note that we have privilegized the black branches, but a discussion should take place to eliminate the case of tangency on a green branch.
A: Note that for all $P \in  {\ell }_{1} , \  \left|A P-B P\right| = \left|A P-{B'} P\right|$ because $B$ and $B'$ are orthogonally symmetrical with respect to $\ell_1$. By the reverse triangle inequality, the absolute difference of the norms of two vectors is smaller than the norm of the difference of these two vectors:
\begin{equation}\left|\left\|\overrightarrow{u}\right\|-\left\|\overrightarrow{v}\right\|\right|  \leqslant  \left\|\overrightarrow{u}-\overrightarrow{v}\right\|\end{equation}
Apply this with the vectors $\overrightarrow{u} = \overrightarrow{P {B'}}$ and
$\overrightarrow{v} = \overrightarrow{P A}$, one gets that
\begin{equation}\left|P {B'}-P A\right|  \leqslant  A {B'}\end{equation}
For the point $P$ drawn on the figure, the difference is exactly
$A {B'}$, hence it is  the maximum.
