We all know the answer to the shortest path, which is the line segment connecting the two points and is the "hello world" example of the Euler-Lagrange equation (see https://en.wikipedia.org/wiki/Euler%E2%80%93Lagrange_equation).
But how about the longest path?
Certainly, without any constraints, the answer is infinity--imagine a wildly oscillating curve. What if with $f'(x)\ge 0$? Seems to me the answer is the black "curve" below (the blue one is the shortest path), but probably it's ill-defined and thus can not be derived analytically?
Update
As @AniruddhaDeb mentioned, $x^n$ can approximate the black curve as $n\to\infty$. Its arclength ($x\in[0,1]$) as a function of $n$ is (via MMA)
$$
\, _2F_1\left(-\frac{1}{2},\frac{1}{2 n-2};\frac{1}{2 n-2}+1;-n^2\right)
$$
where $_2F_1$ is Hypergeometric2F1 in MMA. Plotting from $n=1$ to 50 gives the curve below:

It starts from $\sqrt{2}$ and certainly will reach 2 in the limit $n\to\infty$.

A continuous plane curve $g$ is simply a continuous function from $[0,1]$ into the plane, and the length of $g$ is defined to be the supremum of all $c$ such that there is some increasing sequence $x_0,x_1,x_2,\cdots,x_n$ from $[0,1]$ satisfying $\sum_{k=1}^n \operatorname{dist}(g(x_{k-1}),g(x_k)) = c$. Thus the graph of any increasing $f : [0,1]→[0,1]$ is a continuous curve $g$ given by $g(x) = ⟨x,f(x)⟩$ for each $x∈[0,1]$ that has length at most $2$, because $\operatorname{dist}(g(x_{k-1}),g(x_k)) ≤ (x_k-x_{k-1})+(f(x_k)-f(x_k-1))$ by triangle inequality and since $f$ is increasing.