The armed forces (taking into account the help of allies) are approximately equal. The economic situation was (and will be, in the event of a victory or a "draw") significantly better in country B.
Available options:
1. Stay (with your family) in country B.
2. Return to country A (the safety of the flight is guaranteed; you can take your family with you).
3. Move (with your family) to a third country and wait out the war. The financial situation is the same as in country A.