Talk to Tim first, then go to the town hall and speak with Ellen.
Once you have heard Tim out, Ellen brings up his stomach trouble and offers a remedy for it — she will hand you the medicine directly. The order matters here: speak to Ellen before Tim and the conversation does not trigger, which is the usual reason players get stuck.