A) In order to be parallel, the slopes must be the same. To find p, set the slopes equal to each other:
5/6 = 2/p
Cross multiply:
12 = 5p
p = 12/5
B) In order to be perpendicular, the slopes must be opposite reciprocals. So if one line's slope is 5/6, the other line's slope must be -6/5:
-6/5 = 2/p
10 = -6p
p = 10/-6
Reduced, the answer is p = -5/3.