To unlock Ace the Bat-Hound, start doing the quest lines in the Batcave. You'll find Bat-Hounds first mission to the far right by the Laboratory entrance. His second quest is to free "Timmy" from the well beside him. Destroy the object in front of the well then build a turn-stile to raise "Timmy" out of the well. You will get Bat-Hounds character stud as a reward.
To unlock Krypto the Superdog, follow the quest line on Zamaron hub world until you meet Krypto and have to race him. Beat him and he'll give you his character stud.
Ace the Bat Hound costs 25,000 studs and Krypto costs 65,000. Purchase both in the character selector and then switch to both Ace and Krypto as your A and B characters.