The way I see it, a roleplaying game is both a roleplaying exercise and a game. I understand roleplaying to be a process of imagining yourself as another person and/or in a fictional scenario, and making decisions as you imagine you would if you were that person and/or in that scenario. And I understand a game to be a leisure activity where you try to accomplish a goal or goals, with some sort of rules in place that restrict or otherwise structure how you can pursue the goal or goals, usually to make a that pursuit challenging. Accordingly, a roleplaying game, to me, is a game in which imagining yourself as a fictional character in a fictional scenario is part of that rules structure. The goals you pursue are things the character wants, and the gameplay is about overcoming obstacles in the way of those goals, as you imagine you would if you were that fictional character in that scenario.