“The hand that mocked them” here means the hand of the sculptor. After understanding the passions that arose in the heart of Ozymandias, he reproduced (mocked) them on the stone. “The heart that fed” here means the heart of king Ozymandias which gave birth to those passions as were mocked (reproduced or copied) by the sculptor on the stone.