In this particular derivation of refraction happening at a spherical surface in terms of its radius of curvature , image and object distance and refractive index is done by my book as shown
When we look at equation 3 and 4 , we apply sign convention at 3 because in this case U is negative. But a numerical question just after this is: Takes U to be negative again , isn't that already done before when we derived lens formula , why is it that this particular case , takes U to be negative rather since we have derived a formula for this exact instant which already accounts for the negative?