If you reframe the question as "will the collision of the galaxies cause problems for some hypothetical civilizations who may be living there" the probability of that is simple, it's 1. The good news for such civilizations is that they'll have literally hundreds of thousands of years of warning to deal with them. Planets may have problems but if a civilization is based on space stations and other off-planet structures they'll hardly notice the problems since they'll be so slow to occur.
But the orbit of Jupiter is still a lot bigger than the size of the Sun. To give numbers: The radius of the Sun is 700km, the radius of the orbit of Jupiter is 7*10^8 km (approx, it varies a bit), and the distance to the nearest star is 4*10^13 km.
700 Mm, or 700000 km.
Expected Number of collisions = Number of stars in galaxy B * cross sectional area of star in A / average area of galactic circle per star in A.
https://www.wolframalpha.com/input?i=%28number+of+stars+in+m...
says it comes to 0.5 - 1.0 (the uncertainty comes from number of stars in the milky way)
My assumptions are bad enough that it could be off by a factor of 100 one way or the other (there should be a few factors of 4/pi, it looks like Andromeda is about twice the size of the Milky Way, the average star is smaller than the sun, no stars are point like, gravity probably does something, stars are much more densely packed towards the galactic center, I'm calculating the result one galaxy passing through another, not a merger in which they might partially intersect more than once).