Authors: Russell C. Hibbeler
ISBN-13: 978-0133915426
See our solution for Question 60P from Chapter 5 from Hibbeler's Engineering Mechanics.
We are given the loads ${\bf{P}}$ and the bar length as $d$.
We are asked to determine the distance $d$.
We will draw a free body diagram of the beam.

Here, $a$ is the distance between the point $A$ and $B$, $\theta $ is the angle of the bar, ${A_x}$ is the horizontal force acting at point $A$, $N$ is the normal force.
We will resolve the forces in vertical direction.
\[\begin{array}{c} \sum {{F_y}} = 0\\ N\cos \theta - {\bf{P}} = 0\\ {\bf{P}} = N\cos \theta \end{array}\]We will find the length $AB$ from the figure.
\[\begin{array}{c} \cos \theta = \frac{a}{{AB}}\\ AB = \frac{a}{{\cos \theta }} \end{array}\]We will take the moment about point $A$ to find the distance $d$.
\[\begin{array}{c} \sum {{M_A}} = 0\\ N \times AB - {\bf{P}} \times d\cos \theta = 0\\ {\bf{P}} \times d\cos \theta = N \times AB \end{array}\]Substitute the given expression in the above equation.
\[\begin{array}{c} N\cos \theta \times d\cos \theta = N \times \left( {\frac{a}{{\cos \theta }}} \right)\\ \cos \theta \times d\cos \theta = \frac{a}{{\cos \theta }}\\ d = \frac{a}{{{{\cos }^3}\theta }} \end{array}\]