Question: has similarities with or to?
Answer: Similarity to is the more idiomatic in your example, but similarity with would be used if you were referring to shared similarities: A shares some similarities with B. We usually say 'similar to' so the first sentence is the better one, but the second one could also be used.