Here is the full version of the problem I'm dealing with.
Let $G=(S,T;E)$ be a bipartite graph and let $X$ be one of the two classes of its bipartition (i.e., $X \in \{S,T\}$). For a subset $C \subseteq X$ we define: $$\sigma(C)=\min\{0, |N_G(C)|-|C|\},$$ where $N_G(C)$ is the neighbourhood of the subset $C$ in $G$) (note: $\sigma(\varnothing)=0$). We also define $\xi(S)=\min\limits_{A \subseteq S} \sigma(A)$ and $\xi(T)=\min\limits_{B \subseteq T} \sigma(B)$.
Prove that $$\nu(G)=|S|+\xi(S)=|T|+\xi(T),$$where $\nu(G)$ is the size of a maximum matching in $G$).
The case in which $G$ has a perfect matching is easy to prove, but I'm having trouble with how to approach the other cases.
Using Hall's theorem, I can prove one half of the equality at a time (i.e., either $\nu(G)=|S|+\xi(S)$ or $\nu(G)=|T|+\xi(T)$) but when it comes to proving the other one, I'm lost. I thought about modifying $G$ by adding additional nodes and edges until it has a perfect matching and then proving the property for this new graph, let's say $G'$, but I'm unsure as to how that translates to my main graph $G$.