When two integrals are the same, that does not necessarily mean the integrated functions are the same. Also, in general Ax(BxC) is not equal to (AxB)xC, always watch out with that. (these are just general remarks)
How did you arrive at your first expression for the torque? (in post #1)
edit: I...
Look closely at your formula, does it give the right area when you take for example a circle? (The factor 1/2 is needed to calculate the area correctly)
Yes, the second block essentially 'replaces' the wall as far as forces are concerned. You can see this quite easily if you sketch a quick force diagram; The 100N the extra block exerts on the spring, is the same 100N which would be excerted by a wall, if the spring were attached to a wall...