In other words, you want to show that each component of that graph is a tree.
None of the components can contain a cycle.
Consider the fact |E|=|V|-p. Is a cycle possible?
This is again one of those situations in which I don’t for sure what you have to use. In general a tree has one less edge than vertices. If a component (btw. saying connect is redundant components are connected) has a cycle then it has at least as many edges as vertices. That would contradict the given that |E|=|V|-p.
If every component is a tree then .
So a cycle any where changes that equation.