Could a person do the shinigami deal without losing half his lifespan? Quick question, if you trade half of your life for shinigami eyes and it happens to save your life, would you lose only half of the time you would have lived, or would you somehow lose half of the life that you would actually live since the eyes saved your life?

Bad example: 


1 and 2 in a room
2 has 1's name and is about to write his name down in his Death Note
1 doesnt have 2's name and can't write his down in his Death Note
1 would only have about 30 seconds to live
1 Trades half of his life for Shinigami eyes
1 Writes 2's name down without him knowing and before he writes 1's name down.


Would 1 have 30(-15) seconds to live, or x(÷2)? And there's always the possibility of having his full life and only losing 15 seconds, x(-15).
There are a few things wrong with your theory:


Death by Death Note doesn't count in the user's lifespan. Even if you have 80 more years to live, if I write your name down now you die 30 seconds later.
A Death Note will not work on someone with 12 minutes or less left to live. According to How to Use: XXIX.


So no, the user would lose half of his original lifespan. The only way to extend a lifespan is to get a Shinigami to die for you.