I am studying mechanics and got to this problem. 
I haven't solved it yet but I know how to do it. What I do not understand on the other hand is how that angle is, because the line AB is clearly facing upwards while OC is flat on the ground. If AB was flat on the ground as well, then the angle would simply be the angle between them, but now that AB is facing upwards as well, how is the angle measured? Does it have to do with the dot product and a projection on the "flat" surface, but wouldn't that change the vector AB?
You can shift the vector AB without changing direction from O. More generally draw a line from O so that the line is parallel to AB. Suppose the line is OD. Then OD and AB will be same as there direction and value are same. Now find the angle of OD and OC which lies in a plane formed by OD and OC.
Alternatively you can shift OC line in same way keeping AB vector unchanged and calculate in same way.