Praise be to Allah the Lord of the Worlds.
Istikhara (Islamic prayer of guidance) passed from the Prophet (Blessings and peace of Allah be upon him) entails seeking Allah`s guidance for taking a decision about a certain affair as reflected in the following Hadith: Jabir (May Allah be pleased with him) reported: Messenger of Allah (PBUH) used to teach us the Istikharah (seeking guidance from Allah) in all matters as he would teach us a Surah of the Qur'an. He used to say: "When one of you contemplates entering upon an enterprise, let him perform two Rak'ah of optional prayer other than Fard prayers and then supplicate: "Allahumma inni astakhiruka bi 'ilmika, wa astaqdiruka bi qudratika, wa as-'aluka min fadlikal-'azim. Fainnaka taqdiru wa la aqdiru, wa ta'lamu wa la a'lamu, wa Anta 'allamul- ghuyub. Allahumma in kunta ta'lamu anna hadhal-'amra (and name what you want to do) khairun li fi dini wa ma'ashi wa 'aqibati amri, (or he said) 'ajili amri ajilihi, faqdurhu li wa yassirhu li, thumma barik li fihi. Wa in kunta ta'lamu anna hadhal 'amra (and name what you want to do) sharrun li fi dini wa ma'ashi wa 'aqibati amri, (or he said) wa 'ajili amri wa ajilihi, fasrifhu 'anni, wasrifni 'anhu, waqdur liyal- khaira haithu kana, thumma ardini bihi." (O Allah, I consult You through Your Knowledge, and I seek strength through Your Power, and ask of Your Great Bounty; for You are Capable whereas I am not and, You know and I do not, and You are the Knower of hidden things. O Allah, if You know that this matter (and name it) is good for me in respect of my Deen, my livelihood and the consequences of my affairs, (or he said), the sooner or the later of my affairs then ordain it for me, make it easy for me, and bless it for me. But if You know this matter (and name it) to be bad for my Deen, my livelihood or the consequences of my affairs, (or he said) the sooner or the later of my affairs then turn it away from me, and turn me away from it, and grant me power to do good whatever it may be, and cause me to be contented with it). And let the supplicant specify the object." [Al-Bukhari].
This is among the forms of Istikhara clarified by scholars including the Shafies. The second form is performed by making Du`a without praying. The third form is performed by making Du`a after any prayer with the intention of prayer and Istikhra, and this is better, or without the intention of Istikhara. However, the form of Istikhara mentioned in the above question isn`t permissible because it is actually similar to casting lot by arrows where the one seeking Istikhara seeks guidance to do or not to do something based on sheer chance, and this contradicts adopting means to reach an end. Kindly refer to "Al-Fawakih Ad`Dawaani" by Annafrawi.
In addition, this form contradicts the form passed from the Prophet (PBUH). It is well known that acts of worship have a fixed form and must be performed accordingly. Therefore, it isn`t permissible to add Rakhas or new pillars to prayer. And Allah the Almighty knows best.