|   | 1 |  initial version  | 
sols[0] is x==3 not a substitution command.
Use this instead.
h = x^2-9; h
sols = solve(h == 0, x); sols
h.subs(sols[0])
 Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.
 
                
                Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.