Most of these problems can be solved with the Pythagorean theorem and simple sin/cos/tan. This is no exception (If I understand your question correctly, you can actually do this problem without PT explicitly). You need to make a right triangle using one of the tilted sides of your rotated rectangle as the hypotenuse and then solve that triangle.

In SFML, sprites rotate around the upper-left pixel (also it's position) by default. So use that as the known point and make with an adjacent side to make a solvable triangle which will also give you the x and y offsets from the known rotation point. Then you can use the symmetry of the rectangle to solve for any side you care about.

If you still can't get it, post what you've tried. Maybe an MSPaint drawing of how you're trying to solve this problem. (You'll learn a lot more by fighting through these problems instead of just c+p'ing code if I were to just post the solution.)

I'm going to visit a religious community in a couple of hours and will be there until Monday afternoon, but I might be able to pop in at some point to answer questions. If not, hopefully someone else can pick it up and help you figure this out.