Well all you have to do to apply it to the community section of your battledawn account, click on alliance name and 2 flags will show up, one to mark them hostile and one to mark them friendly....but also a specific alliance flag which you really dont need unless you are confused, confused with what? maybe too many hostile or friendly alliances.
Most important part is to negotiate with the alliance you want to be friendly with....like maybe i dont attack you-you dont attack me
I think if they are stronger it is best to say "lets not attack each other because none of us will win" or "we can try to get rid of another alliance

"
I know this sounds strange but just be nice....dont anger the other person or pressure him..best thing to do is to pray to god XD
I hope this helps