Chris brown has to get to Rihanna with in less moves, he can move diagonally, in one move he can take as many steps as he want unless he takes a turn. If he takes a turn it is another move.
Think the grid is like a chess board, and Chris brown like a bishop, now if you color the grid with white and black in chess board,
If both the co-ordinates are same answer is 0
If Chris is in white and Rihanna in black or vice-versa answer is -1
If both are in same color and the absolute difference of x-coordinates and y-coordinates is equal answer is 1
If both are in same color and the absolute difference of x-coordinates and y-coordinates is not equal answer is 2