See the sketch above. Basic school leaver algebra steps. Plug measurements into calculator, job done.
No strings nor Russian required.
Bp is shorthand for B×p. ( I should really have done it B.p )
You can test your own basic algebra by working from other similar triangles to arrive at the same result for P=...
Eg side pairs
P-N, p and B-N,(p+b)
Similar triangles are only different in the lengths of the sides. They are similar in that all the angles are the same. This makes the ratio of the side lengths the same also. Very handy.
You may notice I drew it with a horizontal base. Extending the apex of the actual shape out to a triangle and working with half you will see none of the maths changes.
Triangles, the most powerful maths in an unforgettable box, alongside circles.
Put them together and add some calculus and you can just about get to the moon.