Let's see if I understand the problem correctly. Given a tree $T$ on $2n$ vertices, you want to create a bipartite graph $G$, on the same vertex set, with bipartition $(A,B)$ such that $|A|=|B|=n$. You want $G$ to be connected, but you want each edge in $G$ to join two vertices at distance at most $k$ in the tree $T$, for the least possible $k$.
Here is the optimal way to do this, which achieves $k=2$. Start with the ordinary bipartition of $T$. Suppose that in this bipartition $|A|>|B|$.
In this case, set aside all the leaves (degree $1$ vertices) of $T$ that are in $A$; let $A'$ be the set of all non-leaves. We show that there's a matching between $A'$ and $B$ that saturates $A'$: a set of edges of $T$ that include every vertex of $A'$ exactly once, and every vertex of $B$ at most once.
To find the matching, let $u \in A'$ be an arbitrary vertex. Each other vertex $v \in A'$ has at least two neighbors, only one of which lies on the path from $u$ to $v$; pick one that does not lie on that path, and match it to $v$. (We can match $u$ with any neighbor we like.) Two vertices $v_1, v_2 \in A'$ cannot be matched to the same vertex $w \in B$; if so, then there are two paths from $u$ to $w$ (one through $v_1$ and one through $v_2$) which contradicts the definition of a tree. So no vertex of $B$ is used multiple times, and we've found a matching from $A'$ to $B$.
(Exercise: this step could also have been done using Hall's theorem!)
In particular, this means that $|A'| \le |B|$. Since $|A| > |B|$, we know that the difference $|B|-|A|$ is at most the number of leaves in $A$.
Now move leaves from $A$ to $B$ one at a time until $|A|=|B|$. When we move a leaf $u$ from $A$ to $B$, we need to connect it back to the tree; to do this, let $v$ be $u$'s only neighbor ($v \in B$) and let $w$ be any non-leaf neighbor of $v$ ($w \in A$). Add the length-$2$ edge $uw$; now the graph is connected again.
This works for all trees except a star: a tree in which all vertices except one are leaves. In this case, the last step fails because the vertex $v$ has no non-leaf neighbors. But in the star, all distances are at most $2$, so any way we decide to balance it will work.
The general idea will work, even though you forgot to mention why the edge $e$ isn't causing you any problems (for example if $u$ and $v$ are both in $A_1\cup B_2$).
A hint for a different, maybe easier approach - prove this by induction, but instead of using a random bridge, use the fact that every tree has a leaf, and remove it.
Best Answer
The basic idea is fine.
Pick a node $v$ of $T$ to be the root. Let $u$ be any node of $T$; since $T$ is a tree, there is a unique path $P_u$ from $v$ to $u$. (Why?) Let $f(u)$ be the length of $P_u$. Let $V_E$ be the set of nodes for which $f(u)$ is even, and let $V_O$ be the set of those for which $f(u)$ is odd. Finish by showing that every edge of $T$ has one endpoint in $V_E$ and the other in $V_O$.