Lord Shiva is trying to give two messages to Arjuna as part of this fight.
First one is make the body and mind of Arjuna ever more stronger. As part of Kairata parva these are the words of lord Shiva to Arjuna
'Thou wert in thy former life Nara, the friend of Narayana. In Vadari wert thou engaged in fierce ascetic austerities for several thousands of years. In thee as well as in Vishnu--that first of male beings--dwelleth great might. Ye both, by your might, hold the universe; O lord, taking up that fierce bow whose twang resembled the deep roar of the clouds, thou, as well as Krishna, chastisedest the Danavas during the coronation of Indra. Even this Gandiva is that bow, O son of Pritha, fit for thy hands. O foremost of male beings, I snatched it from thee, helped by my powers of illusion. This couple of quivers, fit for thee, will again be inexhaustible, O son of Pritha! And, O son of the Kuru race, thy body will be free from pain and disease. Thy prowess is incapable of being baffled. I have been pleased with thee. And, O first of male beings, ask thou of me the boon that thou desirest. O chastiser of all foes, O giver of proper respect, (to those deserving it) not even in heaven is there any male being who is equal to thee, nor any Kshatriya who is thy superior.'
The underlying message is saying that the whole purpose of fight is to make Arjuna more stronger by letting him know of his origin to give mental fortitude and allowing him to touch Shiva as part of fight to remove bodily impurities if any and make Arjuna stronger.
Second message is to be careful while using full force in any conflict and take the step forward after good thought process.
Lord Shiva said the following while bestowing pasupatastra
'O powerful one. I will give to thee that favourite weapon of mine called the Pasuputa. O son of Pandu, thou art capable of holding, hurling, and withdrawing it. Neither the chief himself of the gods, nor Yama, nor the king of the Yakshas, nor Varuna, nor Vayu, knoweth it. How could men know anything of it? But, O son of Pritha, this weapon should not be hurled without adequate cause; for if hurled at any foe of little might it may destroy the whole universe. In the three worlds with all their mobile and immobile creatures, there is none who is incapable of being slain by this weapon. And it may be hurled by the mind, by the eye, by words, and by the bow.'
Lord Shiva is cautioning Arjuna to use it only if it is a must against stronger foe after analysing the situation.
I hope this clarifies your doubts. There is no under current hostility between Vishnu and Shiva. In fact both are one and the same.
These are the words of Arjuna to Lord Shiva once he sees him
'O Kapardin, O chief of all gods, O destroyer of the eyes of Bhaga, O god of gods, O Mahadeva, O thou of blue throat, O thou of matted locks, I know thee as the Cause of all causes. O thou of three eyes, O lord of all! Thou art the refuge of all the gods! This universe hath sprung from thee. Thou art incapable of being vanquished by the three worlds of the celestials, the Asuras, and men. Thou art Siva in the form of Vishnu, and Vishnu in the form of Siva. Thou destroyedest of old the great sacrifice of Daksha. O Hari, O Rudra, I bow to thee. Thou hast an eye on thy forehead. O Sarva, O thou that rainest objects of desire, O bearer of the trident, O wielder of the Pinaka, O Surya, O thou of pure body, O Creator of all, I bow to thee. O lord of all created things, I worship thee to obtain thy grace.
All this thought of Vishnu and Shiva fighting is only in our heads and I would like to repeat again they are one and the same.