USB OTG: Possible to perform emulation of slave device on master with drivers recognized?
Ok, so you need a device with at least 2 USB ports. One of these must be a slave port which you will connect to a host PC and the other port must be a host which you will connect a keyboard/mouse/whatever.
Your device will then enumerate and handle the slave device(s) on its host port, process any information and/or events from these devices, and then forward this data out of its slave port up to the host PC.
So to answer your question simply: yes this is possible.

But, I don't think its going to be possible with either of the boards you're looking at.
The one half would be fairly straightforward. These boards would be quite happy using one of their USB ports to talk to your keyboard/mouse device(s).
The problem comes about when you want to use them to emulate a particular type of slave device to your host PC.
These kind of boards are typically configured to provide a very limited selection of USB profiles to choose from when connecting them to a PC (such as a mass-storage device, serial port emulation, camera or possibly some kind of debugging interface) and you'd find it quite difficult to change this to look like something else - in your case a HID device like a keyboard and/or mouse.
I'm not saying its impossible, but I don't know enough about these boards and its not obvious from their simple overviews that they support this.

This is the kind of application where you will probably need to work at a lower level - more directly with the firmware on a suitable microcontroller or microprocessor.

If I were to try to pull something like this off, I'd be inclined to set up a pair of microcontrollers back-to-back. One of them is the USB OTG host to your keyboard/mouse, the other one acts as a keyboard/mouse compound device to your host PC, and they're connected to each other using SPI.