Let side of square is x.
So we can say area of square is = (side) * (side)
So we can say area =

But as given area is a.
So we can write

Now we can find value of x as

.......................................................(i)
In general perimeter of square = 4 * side
SO the perimeter will be =

But is given perimeter is p.
So we can write

Now we can place value of x in this
