Previous question: link
Say there are two points $P_1(a_1,b_1)$ and $P_2(a_2,b_2)$, the number of ways of reaching $P_1$ from the origin is $w_1$ and $P_2$ from $P_1$ is $w_2$. (Here $a_1<a_2$ and $b_1<b_2$.) So the number of ways (say $W$) of reaching $P_2$ from the origin through $P_1$ is $W=w_1\cdot w_2$. The number of combinations is given by
$$w_1=\binom{a_1+b_1}{a_1},\quad w_2=\binom{(a_2-a_1)+(b_2-b_1)}{a_2-a_1}.$$
You get the above formula for $w_1$ by shifting to make $P_1$ the origin; the shift involves subtracting the coordinates of $P_1$ out of everything.
However: if the number of ways $W$ is given, how do we find a point $P_2$ such its distance from the origin is maximum?