We'll use the Pythagorean Theorem (otherwise known as the Distance Formula):
Going from Q to P, x increases by 1 and y increases by 7. Thus, the component form of QP is <1,7>, and the magnitude of this vector is √(1^2+7^2) = 5√2.
Note: this is equivalent to <1, 7>, square root of 50.