Formation of azobenzene from nitrosobenzene and N-hydroxyaniline
Below is my proposed mechanism. You'll see that we go through some of the same key intermediates, so I think you are on the right track. In your second step, it is much more likely that the proton is removed by acid base reaction instead of through the electron transfer process you've shown. Since the initial intermediate (my second structure) is zwitterionic, we can just say that it will neutralize itself. If the reaction conditions are not acidic (from what I see, it's just methanol and magnesium), then there will not be an appreciable amount of the protonated hydroxylamine. The mechanism doesn't require it, as nitrogen is strong enough to "kick out" hydroxide. The result is essentially an azoxybenzene, so we just need to figure out how to lose the other hydroxyl. As the cationic form, it will want to accept electrons, such as from the magnesium as a free electron. Back to a neutral (radical) compound, the other hydroxyl can be kicked out, giving a radical cation on nitrogen. Filling in a second electron from magnesium results in the azobenzene product.