1) You can do a Mutaa contract for as long as you want but not within a time frame that suggests it’s more like a Permenant marriage like saying to someone I will marry you for 99 years.
2) As for how you you do a muta marriage , well there are three basic conditions :
You have to agree on a period of time
You have to agree on a dowry
And thirdly she has to be divorced, widowed and either a Muslim or from Ahle Kitab and if she was never married you need the permission of her dad.