Adding the Gnomes as friends can be done once you complete the Gnome Side Quest "Phase 1" on the 3rd day. At the end of the 2nd night's activities, there is a Gnome that is standing in your room. Talk to him to get the "Phase 1" quest, and once completed the Gnome will add you as a friend.
*** Spoiler - click to reveal ***The first time you talk to the Gnome, he will ask you to collect underpants; since you killed off most of his fellow Gnomes throughout the night and they are now under quota. You can collect the underpants from the start of the game, so you don't have to wait until the 3rd day to actually collect them. The locations are:
1. The First pair of Underpants is found in the nightstand of Cartman's Mom's room.
2. The Second pair is found in the dresser in Kevin Stoley's room.
3. The third pair is in the dresser in Stan's room.
4. The forth pair is in the dresser in Stan's Parents' room across the hall.
5. The final pair is in the nightstand in Kyle's room.
Talk to the Gnome a second time with the 5 Underpants to get them as friends.
As for adding the Crab People, you just have to talk to the only one in the game and it will add you as a friend. Crab People location:
*** Spoiler - click to reveal ***The Crab People are located inside the back entrance to the sewers. It requires the Alien Probe and the Nagasaki fart ability to reach it; both of which you get playing through the story. Once you get the Nagasaki fart ability, there are two ways to get to the Crab People:
1. If you've already unlocked the back entrance to the sewer (to the left of the Movie Theater), then go down the manhole ladder and head to the left. You will see a boulder with green veins. Use Nagasaki to destroy to boulder, and go left on the path that is now open to talk to the Crab People. You are now friends, and at this point the trophy will pop.
2. If you haven't unlocked the back entrance to the sewers yet, go to the sewers through the main sewer entrance in downtown. Use the Alien Probe Teleporter to cross to the other side and head down the ladder. Shoot the red wheel on the pipe to allow you past the sewage, then u-turn around the wall at the generator. Go left. When you get to a ladder go up, and at the top of the ladder go right behind the wall. Keep going right until you get to another pipe to shoot, then go down the first ladder and head right. Turn the gold wheel to lower the water, then come forward and go right. Shoot down the ladder at the top of the screen and go up. Go left and then trough the tunnel. Here, flip the switch, go right, break the pallet, go down the ladder, and then through the tunnel (before the gate closes back down). Shoot the pipe, then head right and take the ladder down. Head left (feel free to use the switch to slide the bridge to the left out - in case you need to get through here again) and then go through the tunnel in the back of the room. Head left, turn the gold wheel, and go through the tunnel with the red light above it. Go down the ladder, and walk to the right until you see a boulder with green veins. Use Nagasaki to destroy to boulder, and go left on the path that is now open to talk to the Crab People. You are now friends, and at this point the trophy will pop.
Enjoy the extremely catchy song!