We have the chemical equation:
[tex]Co+2Ag^+\to Co^{2+}_{}+2\text{ Ag}.[/tex]You can realize that the cobalt (Co) in the reactant doesn't have any charge, but in the product is losing two electrons (it is a cation), this means that is oxidating. The oxidation half-reaction is:
[tex]Co\to Co^{2+}+e^-.[/tex]And the Ag (silver), is gaining one electron, because in the reactants loses one electron per 2 moles of Ag. The reduction half-reaction is:
[tex]2Ag^++e^-\to\text{ 2Ag.}[/tex]