When Ajani dies, Nim Deathmantle triggers, causing you to pay ({4} magic symbol) to return Ajani from your graveyard to the battlefield, and attach Nim Deathmantle to it.
When Ajani enters the battlefield, its first ability triggers, creating a 2/1 Cat Warrior creature token.
Activate Ashnod's Altar by sacrificing the Cat Warrior, adding ({C} magic symbol) ({C} magic symbol) .
When the Cat Warrior dies, Ajani's second ability triggers. Choose not to transform Ajani.