I'm sure you know what SWAP Ratio is, which makes the calculations very logical.
Swap ratio is the ratio at which company A will acquire company B in equity. So if the SWAP Ratio is 1: 2, Company B will get 1 share of company A in exchange of 2 of their shares.
Since everything is calculated in stock/market price, you will have to consider financial ratios such as book value, earnings per share, profits after tax and dividends paid etc to get to a fair price of trading equity shares of both companies.
In simple terms, make all calculations to get to per share price of company A.
Do similar analysis to reach per share price of company B.
Do the trade-off.
Shall you have any doubts, feel free to get back.