Feasibility of phenyl migration I am learning the fundamentals of organic chemistry,
here is the reaction which got me stumbling me for hours,
in the below reaction i could see that the amine group would get converted into diazonium salt, but i am clueless how to proceed further..

The compund A(solution) is given below, it seems like a phenyl group has migrated to the adjacent carbon, i have never seen something like this and it is also not clear for me why a carbonyl group is formed in the middle. Overall I dont understand the reaction...it would be helpful if someone points out what did i miss out in reading that made me unfit to solve this problem. Thank you!
This is similar to pinacol-pinacolone rearrangement. Only difference is in pinacol-pinacolone rearrangement, carbocation forms by dehydration while here, it forms through diazonium reaction. Following is the tentative mechanism of the rearrangement:

Since reaction progress through carbocation intermediate, the final product is a racemic mixture. $\ce{CH3-C+-CH3}$ (in pinacol) or $\ce{CH3-C+-H}$ (in given compound) can rotate about middle horizontal bond before alkyl or aryl group migration.