From your ordering, it looks like you are putting y position at a higher priority than x position, so something like this would work when comparing two people:
if (a.y > b.y)
// a is before b
else if (a.x < b.x)
// a is before b
else
// b is before a
edit for update This comparison still works with your new criteria. Y position is still has precedence over the X position. If the Y values are equal, the point closest to the top left corner would be the one with the smaller X value. If you want to make your object a comparator, implementing this as your comparator function would allow you to do ArrayList.sort() where negative means the first person is before the second:
public int compareTo(person a, person b) {
if (a.y == b.y)
return a.x-b.x
else
return b.y-a.y
}
//compareTo(Tom, Harry) == -50 (tom is before harry)
//compareTo(Tom, Bob) == -25 (tom is before bob)
//compareTo(Dave, Bob) == 30 (dave is after bob)