Problem finding the steady state

There is definitely a problem with the timing of your predetermined state variables, e.g.

% asset market equilibrium
b(+1)/P=b_bar;
a(+1)/P=b_bar;

looks wrong, because those conditions should not just hold in expectations.