12.5 ml of your nic solution at 50/50 = 6.25 ml of PG, 6.25 ml of VG.
There's actually some nicotine in there, but it only throws the answer by 6%, or not enough to really matter here--3% error on each dilutant, or a bit over 0.18 ml. No big deal.
31.5 ml of 65 PG/35 VG = 20.48 ml of PG, 11.02 ml of VG.
20.48+6.25 ml of PG = 26.73 ml of PG
11.02+6.25 ml of VG = 17.27 ml of VG
You didn't specify if the 6 ml of flavoring was PG, VG, PGA, or alcohol based, but I'll assume PG for the sake of argument.
26.73+6 ml of PG = 32.73 ml of PG
Again, the actual flavoring throws the answer a little bit on the PG, but it's an unknown so I'll just ignore it.
32.73+17.27 ml = 50 ml total (as you already know)
32.73/50 = 65% PG
1-0.65 = 35% VG
The equation is obvious and left as an exercise to the reader.
Just kidding.

I hated it when my books did that and the answer wasn't actually obvious.
PG = ((nic * 0.5) + (mix * 0.65) + (Flavoring amount)) / ((nic * 0.5) + (mix * 0.65) + (Flavoring amount) + (mix * 0.35))
VG = 1 - PG