TL;DR: What you're trying to do doesn't make sense. Take a step back and try to tackle your bigger task in a different way.
Already overridded equal so Class A equals Class B if A is part of B.constitutingObects
That sounds like a very bad idea. It's hard to tell what these objects are meant to represent, but something containing a collection isn't logically equal to an element of that collection - a shopping list isn't equal to "milk".
Don't forget that you must follow the requirements specified by the java.lang.Object documentation. Lots of other code will depend on those guarantees.
Implementing hashCode will basically be impossible unless you just return a constant. The hash code of two equal objects has to be equal, which means the hash code of any instance of ClassB would have to be equal to the hash code of every element of constitutingObjects, which means that all of those elements would have to have the same hash code. Unless instances of ClassA somehow "knew" what their container was, I don't see how this could be possible.