In the multi-site architecture models, it is not clear what settings on retention are available to you.
Is it possible to set different retention timeframes for the same index at two different sites. For example, index A, I want to retain for 2 years at site A, but only 180 days at site B.
Furthermore, is it possible to set up search head affinity for local users at site B to search the data at site B first (with only 180 days of lookback), and then, if a longer lookback is asked for, go back and request the rest from Site A?
No - retention is based on a per index basis only - the site an index is located at can not determine retention settings
Given that, sadly, the second part of your question about search affinity is not possible as a result.