The midpoint formula for a segment is:
apply to points R and P
using the definition of slope find the slope of the segment
apply to points R and P
to lines are parallel when the slopes are the same
two lines are perpendicular when the product of the slopes is equal to -1