In what ratio the line segment AB divided by P where, OA= 4i+2j, OB=18i+4j and OP=8i+4j.

Something is not right here.

If P divides AB in a certain ratio, then P must lie on AB.
It does not.

(back to basics:
slope AP = 2/4 = 1/2
slope of PB = 0/10 = 0 )

Your wording of your sentence is befuddled.
check your typing, or else the question makes no sense