Start by finding the standard reduction potential for the #Ag^+ # and #Ni^(2+)# ion. Normally, the values are listed at the back of most chemistry textbooks.
#Ag^+(aq) + 1e^(-) -> Ag(s)" " E^o= 0.80 \ V#
#Ni^(2+)(aq) + 2e^(-) -> Ni(s)" " E^o= -0.23 \ V#
In the galvanic cell, the reaction is spontaneous and for a spontaneous reaction #E_(cell)^o # must be a positive quantity.
#E_(cell)^o = E_(Anode)^o + E_(cathode)^o #
Manipulate the two equations so that #E_(cell)^o # is positive. Note that the anode is the site of oxidation (where electrons are lost) and the cathode (where electron are gained) is the site for reduction.
#Ag^+(aq) + color(red)(1e^(-)) -> Ag(s)" " E^o= 0.80 \ V#
#Ni(s) -> Ni^(2+)(aq) + color(red)(2e^(-)) " " E^o= 0.23 \ V#
#2xx{Ag^+(aq) + 1e^(-) -> Ag(s)}" " E^o= 0.80 \ V " " color(red)((Cathode))#
#Ni(s) -> Ni^(2+)(aq) + 2e^(-) " " E^o= 0.23 \ V " " color(red)((Anode)"#
#ul" "#
#2Ag^+(aq) + Ni(s) -> Ni^(2+)(aq) + 2Ag(s) " "E_(cell)^o = 1.03 \ V#
Start with the anode components (site of oxidation) - the cathode components are listed to the right.
#Ni(s) | Ni^(2+)(aq)\ || \ Ag^+(aq) | Ag(s)#
The single vertical lines indicate the boundary (phase difference) between solid #Ni# and #Ni^(2+)# ions in the aqueous solution of the first compartment and between solid #Ag# and #Ag^(+)# ions present in the aqueous solution of the second compartments.
The double vertical lines refer to the salt bridge - note that the salt bridge must be an inert salt to both ions present in both compartments of the galvanic cell ...