You simply need to replicate what you take off. Easiest way to do brake pipes is cut the old pipe right next to the union, then, you can put a socket on the union to loosen it (best to use a 6 point socket if you have them). You may need to hold the flexible hose if that is where it connects with a spanner or flat jawed mole grips. A single flare will have a convex end and a double flare has a concave end. HTH.
Tony.
Tony.