Perhaps you referred to a triangle. However, you can use the fact that to conclude that this is a triangle. You can then use the definition of cosine to find the value of p.