Hi Soham,
For Case 1, you will put conditional formatting on the Car Details section that uses THE EXPRESSION = "not(/myfields/Trip/Legs/Leg[ car = 'yes' ])" as the condition, HIDE as the action. This expression checks for the existance of a node, and then negates it. Therefore, if there are zero car checks, then that returns false, which is negated to true, and then hides the section. Conditional formatting is backwards thinking like that.
For Case 2, I suggest that you make this an optional section within the Leg group given in the XPath above, so that the user will click "Insert Hotel Details" instead of having to check a checkbox and then go to a different part of the form to fill in Hotel Details. However, if you really want them to be seperate, you will still use a Hotel group within the Leg group, but you will have another instance of the Leg repeating table, but this one will have a Data Filter (double-click the repeating table, and go to Display tab). The filter will be where hotelCheckBox = 'true'.
Hope this helps, good luck!
Matt Faus / Microsoft InfoPath MVPQdabra® Software / Streamline data gathering to turn process into knowledge