Generate date offset based on another field condition

I am using the following formula

if field(“hidden_role”) == ‘Child’ then (now() - days(random(1500, 1800))) else (now() - days(random(15000, 18000)))

The intent is if the field hidden role is Child then the value of the field which as the formula should return a date that is between 1500 and 1800 earlier than today.

if its not child it should return a date that is between 15000 to 18000 days earlier than today.

I am getting Syntax error for the above formula