I think friendships at that age change a lot year to year.
One of my kids has had a very close friend since school started - and even so, some years at school, they were both closer to other pals, but then became closer again a year or two later.
I think it all depends what they are into - interests are a big thing at that age.
Some kids are immature and very impressionable and not great friends either. Some are far more loyal and have integrity at a young age. Maybe K doesn't have the same values as your daughter. Remember, they are 13.
My kids are mostly introverts. They've never been social butterflies. They've had acquaintance friend groups at school and in activities, but a few very close friends - so they take friendships seriously. Some of their pals over the years - not as much, and it's been hard. They learn that it's not the end of the world and to still be a good friend themselves. To recognize good pals. To be a friend to others, etc.
Some of it is definitely the age. Your daughter just needs to be open to meeting some new kids in the class. Focus on others and not these two. It will happen - she'll meet other pals. Sometimes you're in classes at that age where you have no friends in the class to begin with - that has happened to me, and also my kids, and other years, you know a lot more - and it's just how it goes.
K may being pressured by this P and not having the best time of it either - you never know. Not that that's your concern or your daughter's - but sometimes there is more to it than what is going on that you can see. Or to do with just your daughter. Sometimes these dynamics are complicated - teen girls sometimes involve drama.
ETA - Natalie - love your advice.