Maybe you have just make mistake with second function name? Try changing
doTransformItem({x = toPosition.x, y = toPosition.y + 1, z = toPosition.z}, itemEx.uid, 7523)
with
doTransformBack({x = toPosition.x, y = toPosition.y + 1, z = toPosition.z}, 7522, 7523)
But I don't see sense of making...