Each point should satisfy the equation of the line it belongs to.
This means that:
for the equation of the first line (y=x+b), the point (p,r) satisfies this equation, thus: r = p + b ....................> equation I
for the equation of the second line (y=2x+b), the point (2p,5r) satisfies this equation, thus: 5r = 4p + b ...................> equation II
Subtract equation I from equation II to eliminate the constant b:
5r-r = 4p+b-p-b
4r = 3p
Thus, r/p = 3/4