Object class is the parent of all, I hope this gives you the answer. To add more if this rule was not there, probably it won't have allowed to to call the equals method of with reference of Moof, because the method expects Object reference type. Correct me if I am wrong.
With the help of runtime polymorphism, the Object o which is an argument to the equals method, can be ANY object - for example, one can call
etc. This would result in the condition o instanceof Moof = false and thus the method equals() would return false. This is the prefered implementation, used in the Java API - when calling equals to compare two objects of different class hierarchies, the equals method returns false.
So the method equals() can possibly return true only if the passed object o is instanceof Moof.
The instanceof test is important, because in the "if" clause, you make a down-cast and you want to avoid RuntimeException (in this case, ClassCastException).
Hope this helps.
(It may be helpful for you to review runtime polymorphism and down-casting in the K&B book.)
In the first expression, you are first checking whether the passed object is Moof or not. If it is a Moof object, then in the second expression you are checking whether both the moof objects contain the same value or not.