Firstly, a cautionary note.
The AB platform may not tolerate the syntax used in this explanation. In an attempt to minimise being misconstrued, those terms accented with an arrow are located next to the margin.
Part a.) Let us determine
→
AP
and
→
AB
Thus;
→
AP = AO + OP
AP = 2a - 4b + 4a + nb
→
AP = 6a - (4 - n)b
Moving on;
→
AB = AO + OB
AB = 2a - 4b + 7a + b
→
AB = 9a - 3b
factorising gives;
→
AB = 3(3a - b)
Since vector AP sits on straight line AB, it can be expressed as;
→
AP = 2(3a - b(4 - n)/2) Where (4 - n)/2 = 1
Rearranging for n;
Answer n = 2
Part b.)
→
AP = 6a - (4 - 2)b
leads to;
→
AP = 2(3a - b)
As for PB;
→
PB = PO + OB
PB = -4a - 2b + 7a + b
this yields;
→
PB = 3a - b
now compare with
→
AP = 2(3a - b) where 2 is a scalar quantity.
Clearly the ratio AP : PB;
Answer 2 : 1