Answer:
Potential energy is

Step-by-step explanation:
Given situation is shown in figure 1
In order to calculate the potential energy at the moment block started moving we first have to calculate the net force acting on the block. For this consider figure 2
Forces acting in vertical direction:
Normal force Fn acting on block is in upward direction which is balanced by horizontal component of weight of block acting in opposite direction.

Forces acting in horizontal direction:
Tension in string is equal and opposite to frictional force and and vertical component of weight as show in figure 2

Frictional force is:

From (1)

(2) becomes then

If spring is not accelerating then tension in rope must be equal spring force i.e

Then (2) becomes


Potential energy is given as
