1. He was standing right behind her.

2. He was standing just behind her.

3. I got here right after nine.
4. I got here just after nine.

5. The bus came right on time.
6. The bus came just one time.
7. The bus came exactly on time.
-------------------
Are they all grammatical?
Are 'right' and 'just' interchangeable?

just, used in position, connotes very close.

just behind is immediately behind
just on schedule is within seconds
just after nine is closer to 9 than after nine.
Many folks would use them interchangeably, but my use is as above.