Logic 1:
If I give a number (decimal) for a question a sub question should be popped. (Note: I am not selecting the question, but I am entering a value for that)
Logic 2:
I have 3 decimal type questions under one group. The sum of all the three should not exceed $100. (this is for our calculation)
-Income of person 1
-Income of person 2
-Income of person 3
Although it may seem obvious, the precise problem is somewhat under-defined (and open to interpretation, which affects the solution): eg
less than 100, or less than or equal to?
can income be negative? (presumably not, but because we're having to define the calculation using integers, there's no harm in specifying these must be whole numbers. This is easy to forget...)
are all the questions mandatory, relevant on each other, or can they be answered in any order, etc. For example, if the user answers 100 for income1, do you want to even bother showing the other two?
When you are dealing with multiple questions with mutual-dependence on each other, you need to frame the problem rather carefully, especially the order in which they must be answered (if any).