How to find the elongation of a spring when it is tied to a brass bar over a tilted wall? The problem is as follows:

An homogeneous brass bar which goes from point $A$ to point $B$ has a
weight of $300\,N$. The bar is suported over two frictionless surfaces
as it is shown in the picture from below. The system is in static
equilibrium by the action of the force excerted by the spring tied to
the end at point $B$ on the bar which in turn is fixed to the ceiling.
Using this information find the elongation of the spring. Assume that
the constant of the spring is $k=500\,\frac{N}{m}$.


The alternatives given in my book are as follows:
$\begin{array}{ll}
1.&28\,cm\\
2.&23\,cm\\
3.&25\,cm\\
4.&26\,cm\\
5.&30\,cm\\
\end{array}$
What I did to solve this problem was to use a "trick" which I seen in a similar problem about a ladder standing next to a wall.
The rationale was that when an horizontal object is leaning against two surfaces there will be a reaction from both. But if it is asked a force in between. You may use any point to establish the torque about that point and use Varignon's theorem? to find the unknown force. This is done to "cancel out" the reaction force from both surfaces.
Therefore:
Torque about the point specified in the figure from below results into:

$\sum_{i=1}^{n}\tau=0$
$(l\cos 30^{\circ})\times(300)+500\times x \times 2l =0$
simplifying terms:
$-\frac{\sqrt {3}}{2}\times 3 + 10 x = 0$
$x= \frac{3 \sqrt {3}}{20}\approx .2598076212 \,m$
which transformed into cm would be about $26\,cm$ and this appears in the alternatives as option four. But is my answer the right approach to this problem?.
My source of confusion is that in the problem is not indicated if the spring is paralell to the incline or if it does make another angle.
It is not indicated in the problem but how can I find let's say the Reaction in both the floor and in the wall?. How can I find these?. Am I using Varignon's theorem in this problem?. Can someone help me with this matter please?.
 A: First, if you are referring to Varignons' theorem about quadrilaterals and the parallelogram formed by the midpoints of the sides, I don't think you are usinng it.
Second, to determine both the reactions in the floor and the wall we can apply Newton's law and impose that the sum af all forces is zero, and then impose that the torque about any point we want is zero. You already did the second part, so you could just apply Newton's law:
$$\vec{N_A}+\vec{N_B}+\vec{P}+k\vec{\Delta l}=0$$
If the spring is parallel to the wall we know the directions of all this vectors and by decomposing along two axes $x$ and $y$ (I choose the $x$-axis parallel to the ground, but it's arbitrary) we obtain two equations that allow us to find the moduluses of the reaction forces:
$$N_A+\frac{N_B}{2}-P+\frac{\sqrt{3}}{2}k\Delta l=0$$
$$-\frac{\sqrt{3}}{2}N_B+\frac{1}{2}k\Delta l=0$$
Personally I solved the problem calculating the torque about the point B because there are 4 forces and two are applied in B, so the equations are particularly simple, but any other point is just as good and gives the same solutions. I too found that the answer is 26cm
A: Calling $\alpha = 30^{\circ},\ \beta = 60^{\circ}$ and
$$
\cases{
A=(0,0)\\
B=A+l(\cos\alpha,\sin\alpha)\\
G = \frac 12\left(B+A\right)
}
$$
with the forces
$$
\cases{
f_A = (0,N_A)\\
f_B = k \Delta x (\cos\beta,\sin\beta)+N_B(-\cos\alpha,\sin\alpha)\\
f_G = (0,-W)
}
$$
we have
$$
\cases{
f_A+f_B+f_G = 0\\
(A-B)\times f_A+(G-B)\times f_G = 0
}
$$
from which we obtain
$$
N_A = \frac W2,\ N_B = \frac W4,\ \Delta x = \frac{\sqrt{3}W}{4k}
$$
so $\Delta x\approx 0.26$ cm
Another way using virtual displacements.
Calling
$$
\cases{
f_{B_1} = k \Delta x (\cos\beta,\sin\beta)\\
f_{B_2} = N_B(-\cos\alpha,\sin\alpha)
}
$$
In equilibrium, we have
$$
\delta A\cdot f_A + \delta G\cdot f_G + \delta B \cdot\left(f_{B_1}+f_{B_2}\right) = 0
$$
and due to orthogonality
$$
\delta A\cdot f_A = \delta A\cdot f_G = \delta B\cdot f_{B_2} = 0
$$
and following
$$
\frac 12\left(\delta A + \Delta x(\cos\beta,\sin\beta)\right)\cdot f_G + k (\Delta x)^2\left(\cos\beta,\sin\beta\right)\cdot \left(\cos\beta,\sin\beta\right)=0
$$
or
$$
-\frac 12 W\sin\beta + k\Delta x = 0\Rightarrow \Delta x = \frac{\sqrt{3}W}{4k}
$$
A: Fig 2 has made things easy for taking force/moment equilibrium to evaluate forces.
Take moments about top left corner call it $I$
$$ k x \cdot 2 l = l \cos 30^{\circ} 300 $$
$ x = 0.2598 $ meters i.e., the fourth option:
$$x= 25.98 cm $$
Btw, I is the  center about which the brass bar is instantaneously rotating in dynamic problems.
