I don't see what the latter questions have to do with work.
In the third picture, when considering the deviation from x, change the relationship between buoyancy and x, so that k can be obtained according to F=kx. If the restoring force is not proportional to x in the period of obtaining simple harmonic vibration, it is not simple harmonic vibration and has no fixed period.