If you know PQ and QN, and they are in the same line, you should just add them and there you have PN. If you know MP and MN, it is the same as having NM and MP, and finding NP is the same as finding PN (if you read them backwards, it's the same distance). The problem would be if they are not in the same line, in which case you will need to know an angle and then you would be able to use cosin theorem.