For which values ofmandnis the complete bipartite graph onmandnvertices a tree?

I'm using Discrete Mathematics 5th edition by Richard Johnsonbaugh, chapter 7.1 #5

Please help I've been working on this problem for hours and I can't figure it out after reading a lot... I just don't understand. Thank you!