The answer to a). will be (height of 5):
For b.): I assume the height function will be to find the height of the tree. So, I will have to compare right and left sub-trees and get the tallest subtree + 1(root node) = Height
But what happens if there is a duplicate node? I'm a novice java coder but if I'm right, on this code it will just ignore the duplicate node and return the result of the tree before attempting to add the duplicate node.