The first version (waving one paw from the ground) is easier to teach initially when the guinea pig is on a (sturdy and safe!) low platform at first. This way, you can move your hand away to encourage them to reach and wave their paw, rather than just climb onto your hand. :) Once the guinea pig learns the trick, you can practice it without the platform.
Go To a Platform
Stand Up & Beg