The equals method must be Reflexive, Symmetric, Transitive and Consistent. That means:
Reflexive: x.equals(x) must be true
Symmetric: if x.equals(y) is true , then y.equals(x) must be true
Transitive: if x.equals(y) is true and x.equals(z) is true, then y.equals(z) must be true
Consistent: multiple calls to equals must return in the same result
Now as for hashCode(), there is one major rule:
If two objects are equal, the hashcode needs to be equal as well. The same however does not apply in reverse.
Given the information above
you should be able to solve the question.