Here's the idea: run BFS level by level. At each level, the last node you process is the one visible from the right.
You use a queue. Start with the root. For each level, record how many nodes are in the queue (that's your level size). Process all of them, enqueueing their children. The final node you process at that level is your answer for that depth.
An alternative is DFS visiting right children before left. The first node you encounter at a new depth is the rightmost. BFS is more straightforward for interviews because the level structure is explicit.