Phenol dissolved into sodium hydroxide solution to give another solution A.

What would be formed when A reacted with phenylamine/nitrous acid mixture , butylamine/nitrous acid mixture and ammonia/ nitrous acid respectively ?

The resulting solution were brown , red and colorless respectively .

Lastly , i would like to know how can i know what reaction involved in organic reaction ? Find in the books or deduce the compound by the observable results ? However,it seems that it is difficult to deduce the organic compound actually ...How can i do?