If one gets this belief that Allah and Imam Sahib Zaman (ajtfs) are in front of him and watching him continuously, can he talk to Allah and the Imam in a very informal and friendly manner as if he is talking to his friends?
Different people have different ways of relating to Allah. Usually, people are at least a little bit reverent and show respect towards Allah like they might do towards people whom they respect in society, rather than being extremely casual like they might be with their friends.
However, everyone is different, and it is ok to talk to Allah in whatever way you feel is natural for you, especially if you feel like there is a good response. The important thing is that you are sincere.
The same with Imam Zaman (A).
It is said that some prophets like Yusuf (A) enjoyed a special sort of informality with Allah due to their extremely high level of closeness to Allah, which could make it more like a casual chat than a formal prayer, although this sort of thing will again vary from person to person.
Anyway, recommended etiquette for speaking with Allah (and the Imams) is modelled in the Qur'an, duas, and ziyarat texts that we have, and one can read these and see if they find inspiration in the style of talking there. But again, everyone is different!