Because he'll only give you the key once you do what he asked you to do. Aka, prepare Emma for him. So you basically destroyed the quest because by not sharing Emma but not arresting Mario you wont be able to invite her to the farm, and by betraying Sofia you cannot arrest mario, and he kidnapps her but doesn't fully trust you unless you share Emma with him.