If \(P\) lies inside \(AB\) with \(AP:PB=m:n\), its coordinates are \(P=\left(\frac{nx_A+mx_B}{m+n},\frac{ny_A+my_B}{m+n}\right)\). The larger part of the distance travelled from \(A\) puts more weight on \(B\).
A median goes from a vertex to the midpoint of the opposite side. A triangle has three medians, and they meet at the centroid \(G\). A median can be slanted and need not be perpendicular to that side.
On median \(AM\), \(AG:GM=2:1\). Thus the centroid is two thirds of the way from the vertex to the opposite midpoint. Reversing the endpoint order reverses the displayed ratio.