To solve this problem we need to consider the concept about Ampere's Law.
The Ampere's law say that,
![F = (\mu_0 I_1I_2)/(2\pi R)](https://img.qammunity.org/2020/formulas/physics/college/ydozocc82d5y35yuoye1i7x42jg7qpe0g2.png)
Where,
F= Mangetic field
Permeability of free space
![(4\pi*10^(-7)})](https://img.qammunity.org/2020/formulas/physics/college/4n6yado5rgmt8xh4bptswv523p034drtn6.png)
I =current
R= Radius from the wire in meters.
A) At the first case the force on wire is repulsive, replacing our values
![F = \frac{4\pi*10^(-7)}*2*5}{2\pi *10*10^(-2)}](https://img.qammunity.org/2020/formulas/physics/college/8azz0tsxo22ptbojtpt4yotq4nww3hc0yf.png)
In repulsive direction.
B) At the second case de Force flow in the same direction, then we have,
![F = \frac{4\pi*10^(-7)}*2*5}{2\pi *10*10^(-2)}](https://img.qammunity.org/2020/formulas/physics/college/8azz0tsxo22ptbojtpt4yotq4nww3hc0yf.png)
In attractive direction