You first need to define the origin which everything is relative to. You've defined the origin (0,0) to be the top left corner of the main screen, and lets say that X goes positive to the left and Y goes positive downward.
To represent a vector, you need two pieces of information: 1) the location of the start and 2) the location of the end.
The location of the start is generally represented by a point (x,y) relative the coordinate system origin.
The location of the end can be represented by either another point relative to the coordinate system origin, or by a point relative to the starting point of the vector. Doesn't really matter as long as you do the math correctly whenever you use the vectors.
So for Q, it might be represented as start=(0,0) and end=(5,5). Since it starts at the origin, its "end" representation is the same regardless of whether your are making it relative to the origin or relative to the starting point of Q.
For P, lets say its start=(0,0) and end=(5,4).
For R, We can represent it either as start=(5,4) and end=(5,5) or we can represent it as start=(5,4) and end=(0,1), depending on whether the end point is relative to the origin or the starting point. It doesn't matter as long as you treat all vectors the same way.