The question which has to be asked is "Why is there an authorised instructor on board?"
If for any reason other than as a passenger, then the authorised instructor must be providing some element of training or supervision. In which case, he/she must be the aircraft commander.
The fact that the other pilot is legally entitled to fly the aeroplane solo is nihil ad rem. Why, then, did he/she not do so?