We are left with following problem, upon which TcT provides the
certificate YES(?,O(n^1)).

Strict Trs:
  { f(X) -> n__f(X)
  , f(f(a())) -> f(g(n__f(n__a())))
  , a() -> n__a()
  , activate(X) -> X
  , activate(n__f(X)) -> f(activate(X))
  , activate(n__a()) -> a() }
Obligation:
  runtime complexity
Answer:
  YES(?,O(n^1))

The problem is match-bounded by 3. The enriched problem is
compatible with the following automaton.
{ f_0(2) -> 1
, f_1(3) -> 1
, f_1(3) -> 3
, f_2(4) -> 1
, f_2(4) -> 3
, a_0() -> 1
, a_1() -> 1
, a_1() -> 3
, g_0(2) -> 1
, g_0(2) -> 2
, g_0(2) -> 3
, g_2(3) -> 4
, n__f_0(2) -> 1
, n__f_0(2) -> 2
, n__f_0(2) -> 3
, n__f_1(2) -> 1
, n__f_2(3) -> 1
, n__f_2(3) -> 3
, n__f_3(4) -> 1
, n__f_3(4) -> 3
, n__a_0() -> 1
, n__a_0() -> 2
, n__a_0() -> 3
, n__a_1() -> 1
, n__a_2() -> 1
, n__a_2() -> 3
, activate_0(2) -> 1
, activate_1(2) -> 3 }

Hurray, we answered YES(?,O(n^1))