If you don't need to do this programatically, you can do it in xml. In order to have the child LinearLayouts take up a percentage of the Parent LinearLayout (LinearLayout A) then you need to set the parent's weightSum=(Total layout_weight of child LinearLayouts) and then set the child LinearLayouts width/height property to "0dip" and set their layout_weight to the desired percentage.
Sample code for a vertical orientation would be:
<LinearLayout
android:id="@+id/A"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:weightSum="8.0"
android:orientation="vertical">
<LinearLayout
android:id="@+id/B"
android:layout_height="0dip"
android:layout_width="fill_parent"
android:layout_weight="1.0"/>
<LinearLayout
android:id="@+id/C"
android:layout_height="0dip"
android:layout_width="fill_parent"
android:layout_weight="3.0"
</LinearLayout>