proportioning valve questions

OK firstly, NO UNIONS!

If item #1 is an access port plug with a spring behind it, then do not use that port for anything. That end-of-the-device,should be used for the rear brake system.
That plumbing looks strange.
In the OEM system,the front brake lines usually have different fittings, than the rear lines. Thats supposed to make the hook-up foolproof.
Notice in the picture, Both lines have one of each fitting on them.I have never seen that.
It does however look right, in that the rearmost M/C port is entering the correct end of the valve, the end furthest from the proportioning spring(port#1)
Looking at your picture; the rearmost M/C line(which should be going to the front brakes) should immediately split out to the left and right,front lines.The remaining two side-ports then go to the M/C, and rear brakes in whatever position is convenient.
The rearmost port at the M/C, which feeds the front brakes should NOT have a residual valve in it.

(On the OEM combination valve the line for the front brakes comes from the port closest to the booster and enters the valve from the end,on the end furthest from the spring, and then splits immediately out to the calipers. The ports just a bit further down then go to the rear brakes and to the M/C remaining port.Since those rear ports on the valve are directly open to eachother, which goes where doesnt matter.)