This is the 1706th most frequent Russian word.
бывшим
"Former" or "ex-."
Here, 'бывшим' functions as an adjective meaning 'former', describing 'друга' (friend).
Я встретил своего бывшего друга на улице.
I met my former friend on the street.
Here, 'бывшим' is used as a noun in its instrumental case, referring to 'ex-husband'.
Она общается со своим бывшим мужем.
She communicates with her ex-husband.
Here, 'бывшим' is an instrumental case adjective modifying 'офицером' (officer), meaning 'former'.