Hi,
If you had just asked about the program, you don't have email the professors. But if you had contacted them about their research work and projects, It would be courteous to email them that you had found a project in university A, which closely matches your interests.
You don't have to inform the graduate office of admission. If there is an online portal please decline the offer of admission there. If a reason is asked, mention that you received an offer from another program which closely matches your interests.