excuse my paint.net artistry
periapsis is the position which has the least distance between the focus and itself. consequently this is a - c.
apoapsis is the position which has the most distance between the focus and itself. this is a + c
e = c/a (eccentricity)
r_p = a - ea = a(1-e)
r_a = a + ea = a(1+e)
and the ratio of p to a is simply Rp/Ra
If you want reasoning how the radius equation is found