I have learnt that change in potential energy in any conservative force field is equal to the negative of work done by that field through a distance. While applying the same for gravitational potential energy, I move a mass $m$ in the field of a large immovable mass $M$ from infinity to a point P which is a distance $x$ from the source mass, I obtain the work done as $$W = -\frac{GMm}{x}$$
But now, the change in potential energy will be negative of this work done and hence the it would be $$\Delta\text{PE (from infinity to P)} = -W = \frac{GMm}{x}$$
The problem is that this energy term is taken negative in the expression of total energy of a satellite. I don't know what I have done wrong?
Follow up question: while calculating total energy of the satellite in a orbit of radius r at a point p(say), we take potential energy term as the work done from infinity to that point but we have launched the satellite from earth surface to a height h (r=R+h, where R is the radius of earth) then why not take change in potential energy from surface to that point ?