Question: document layout

hi everyone,
i'm trying do a tamplate for solving school problem. I need only input some variables at begining and it's should give me whole solution. But i need to print it so i have to use this layout style:

i have:
then i use:

i wanna have inline form
but i can get only
this is just for examle of layout i want to get but i don't know how...
if i turn off input the subs(x=2,f) dissappear but gap still remines..

btw does exist a statement by which can i control if expreson is inline or not?
Please Wait...