You have to replace the symbol x with a function:
x
x''[t] + x[t]^3 /. x -> Function[t, A*Sin[\[Omega]*t]]
The pattern x[t_] does not match anything in x''[t].
x[t_]
x''[t]