In Act III, Prospero gives Ferdinand Caliban's old duties. However, Prospero does not view Ferdinand in the same light as he views Caliban. To Prospero, Ferdinand is the heir apparent to Alonso's throne (Alonso is the king of Naples). As such, Ferdinand is considered a worthy claimant of Miranda's hand in marriage. On the other hand, Prospero thinks of Caliban as the cursed offspring of a demented witch, Sycorax.
Although Caliban has repeatedly asked to be released from Prospero's employ, the latter has not seen fit to give his servant the freedom he desires. In Act III Scene I, we see Ferdinand performing Caliban's former duties. He brings in firewood but delights in laboring on behalf of the beautiful Miranda. Meanwhile, Miranda (smitten by Ferdinand) bids him rest from his labors. Prospero, hidden from sight by a powerful spell, watches as Ferdinand and Miranda engage in a lovers' courtship. Far from being angry, Prospero is pleased that both Miranda and Ferdinand are romantically inclined towards each other.
So, although Ferdinand's servility is similar to Caliban's on a superficial level, it differs in terms of purpose. In giving Ferdinand Caliban's old position as a slave, Prospero is testing Ferdinand's intentions towards Miranda. As a father, Prospero wants to ascertain the depth of Ferdinand's interest in Miranda; he wants to make sure that Ferdinand's feelings are genuine. On the other hand, Prospero keeps Caliban enslaved because he does not trust him. To Prospero, Caliban is merely the cursed spawn of an evil witch, unworthy of regard or compassion. Certainly, Prospero would never consider Caliban a fit husband for his daughter.
In Act III, there is no love lost between Caliban and Prospero. In fact, in Act III Scene II, Caliban plots with Stephano to kill Prospero. So, although Prospero commits Ferdinand to his service in Act III, this is temporary. Ferdinand's service will only last until Prospero can force his old enemies to account for their past actions. Then, he will rejoice in marrying his daughter to Ferdinand. On the other hand, Prospero never changes his views about Caliban; to Prospero, Caliban is the monster who tried to rape Miranda for the purpose of peopling the island with a race of Calibans. Because of Caliban's depravity, Prospero considers him unworthy of his regard or mercy. This is quite unlike the way he views or treats Ferdinand, the future king of Naples.
In Act Three (not Two), Prospero treats Ferdinand like a slave. There are several reasons for this. He is still angry over the loss of his kingdom, and Ferdinand is linked to that. He (Prospero) is showing his mastery over the island. He's trying to keep control of his daughter…though losing to love. And he's trying to test Ferdinand's character and make him work to demonstrate his love of Miranda. It's a test, like those in fairy tales and myths.
It's like his treatment of Caliban because both must labor for Prospero due to his authority and magic (and both want Miranda). It's unlike because it will end.