On the logon page you will have three variables (username, password, local_pass) and after you perform the AD auth (it will use session.logon.last.username and session.logon.last.password) you will then need to do a variable assign action to assign session.logon.last.local_pass to session.logon.last.password.
The next step would be the LocalDB auth which will also use the session.logon.last.username and session.logon.last.password.
Check out this DevCentral article and see if it helps.
https://devcentral.f5.com/questions/f5-apm-mutiple-authentication-method
Regards,
Seth