Try to find any paper where the system Ag-Sn has been thermodynamically modeled and you will find the functions. Just remember that G is a function of x and T and probably you will find only excess Gibbs energy in a paper (so you have to add terms connected to pure elements and terms connected to mechanical mixing).