AppleOne interview question

implement a Q using two Stacka