Let u and v be base points in Y. Since Y is path connected, establish a path p from v to u.
Let b be the base point of our sphere, thus the functions in πn map b to u. draw a small closed disk about b and call it D. Let E be the complement of D, with the boundary of D thrown in for good measure. Thus D and E are closed, and they intersect in the boundary of D. A smooth homotopy shrinks D down to b, stretching E to compensate. If f is a function whose domain is the entire sphere, compose this with the shrink stretch map, and the domain of f becomes E. We are then free to map D anywhere else, provided the boundary of D maps to u. For example, D could map onto p, where the boundary of D maps to u and b maps to v. The distance from b determines the distance along the path from v to u.
The above describes a transformation from f into g, from an image based at u to an image based at v. Seen another way, g is f with a tail pulled out at one end, like pulling on the mouthpiece of a balloon. The end of the tail becomes the new base point for g.
If f1 and f2 are homotopic, then g1 and g2, constructed as above, are homotopic. Apply the original homotopy from f1 to f2 across E, while the constant homotopy maps D onto p. Therefore, the transformation from f to g is a well defined map from the homotopy classes of the sphere based at u, into the homotopy classes of the sphere based at v.
Next apply the inverse transformation, from v back to u, and watch what happens to f. The new image maps b to u, and runs along p in reverse as we move out away from b. After a while the image reaches v and doubles back on itself, tracing p back to u. Finally we reach u again, and the rest of the sphere looks like f. A homotopy retracts the path, sucking the out and back tail into the balloon, until all of D maps to u. Another homotopy shrinks D down to b, and f is once again applied to the original sphere. In other words, moving f from u to v, and then back to u, produces an image that is homotopic to f. The two transformations are inverse to each other, and the correspondence is a bijection. As a set, πn is base point invariant. But πn is not just a set, it's a group, so we have more work to do.
Let f3 = f1+f2, using sphere concatenation. Convert these images into g1 g2 and g3, and consider the concatenation of g1 and g2. The equator maps to v, the new base point. A band just above the equator becomes the path from v to u, leading to f1, and a band below the equator becomes the path from v to u, leading to f2. In contrast, g3 carries a disk D, centered at the equator, onto the path from v to u, while the rest of the sphere becomes f1+f2. The equator is the boundary between f1 and f2. These functions are not identical, but they are homotopic. This is not easy to prove analytically, but it is intuitive. I'll try to describe the homotopy. Picture the disc superimposed on the bands above and below the equator. The radius of the disk equals the width of each band. Stretch the disk along the equator, pushing f1 and f2 out of the way as you go. The disk becomes an ellipse, longer and longer, until it wraps all the way around the sphere and kisses itself on the other side. This point of self tangency, call it t, maps to u, just like the rest of the perimeter of the ellipse. Points near t map to points along p near u. Push the ends of the ellipse together, creating a flat edge, then break the edge at t, so that the interior of the ellipse contains the entire equator. This can all be done without losing continuity. Press the ellipse outward until it fills the equatorial bands. It has pushed f1 up into the northern hemisphere, and f2 down into the southern hemisphere. We're almost there.
Notice that b is still the only point that maps to v. Stretch this into an arc, along the equator, that maps to v. This pushes nearby points along the path from v towards u. Stretch this arc all the way around the equator, until the equator maps to v, and the bands above and below the equator map to p, from v to u. We have transformed g3 into g1+g2. The two images are homotopic, and represent the same homotopy class. The base point shift respects the action of the group, and πn, as a group, is base point invariant. It is strictly a function of the space Y.