Two vectors will be perpendicular i.e. at the angle of 90° if their scalar product (dot product) is equal to 0.
So let's find scalar product of those two vectors:
Now for those two vectors to be perpendicular `17+2p` must be equal to 0.
`p=-17/2` <-- Your solution