Vishnu and Shiva work together in the trimurti or the trinity of Hinduism. Brahma, Vishnu and Shiva are the natural functioning of the universe, therfore view the relationship between Brahma, Vishnu and Shiva as the natural order of Divinity, one substance, The Supreme, The Absolute, God etc... Brahma is the principle of creation, Vishnu is the preserving or maintaining principle of the universe and Shiva is responsible for dissolution or destruction. This natural functioning of the universe is birth, life and death, therefore we can view Vishnu as the cosmic functioning of life (sustaining principle) and Shiva as the cosmic functioning of death (dissolution, destruction principle). In order for the cosmic principle of birth to transpire there must be destruction (nothing born into the world lives forever), because from destruction comes birth, or creation (Brahma). For example we, can view Shiva as the principle of a forest fire destroying a forest, but from this destruction there is the birth (Brahma) of new growth, new trees, new plant life, a vibrant renewed forest where life flourishes. From the destuction of Shiva and birth from Brahma, Vishnu sustains and preserves life until Shiva destroys and the cycle is repeated.
In Hindu thought, the relationship between Brahma, Vishnu and Shiva is the natural functioning of the universe, life as we know it, and there is no friction between them because they function as they should as one entity. These three principles function life and the three personified principles are one eternal Divine principle responsible for all that is. However, in Hinduism, there are Vaishnavites who worship Vishnu as Supreme Lord and Savites who worship Shiva as Supreme Lord. Two notable avatars (incarnations) of Vishnu are Sri Krishna and Buddha. Lord Ganesha is the elephant headed son of Shiva.
In closing, on the absolute scale, within the totality of existence, the manifest consciousness, the constant cycle of birth, life and death transpires each moment and the functioning of Brahma, Vishnu and Shiva is the fomless, immutable reality underlying and pervading the ephemeral universe. I hope this submission has been helpful in answering your enquiry!
Experiential yoga sadhana, a comprehensive study of Indian philosophy in both India and Canada and a state of enduring "Gentle Love".