is it compulsory to write both the viteee mock test to write the main entrance
No! Mock test's aren't compulsory to attend. you can attend both or none. But giving mock test will make you familiar to the system in which you are going to give the main entrance as well as you will get the blue prints of the exam pattern imprinted on your mind.
So I would recommend you to give atleast one mock test if you can't give both.
For VITEEE preparation strategy you may visit the link provided below:
https://engineering.careers360.com/articles/viteee-preparation-tips
I hope this answer helps. All the very best for your future endeavors!