Regarding your first question, you are supposed to develop an app from scratch. But, I am sure the judges won't mind if you use some of the ideas and code from your existing app given that you were the one who created the other app as well.
And for the second question, you can use anything as long as they exist in the Ubuntu 12.04 repositories. This restriction is because of the App Review Board guidelines.
Relevant parts from the guidelines below:
You can include any libraries that are part of your app. For example, if you're writing a Python game, and you've written a Python library to store character data, it's fine to include that with your app.
If your app depends on external libraries, please make sure that your app runs on the current versions shipped in Ubuntu. (We're open to considering dependencies on backported libraries, on a case-by-case basis, but only if the backport is a new library and not an updated version of an existing library.)
No other software can depend on the application being submitted (e.g. development libraries should be submitted to main/universe or upstream to Debian instead).
Applications must be able to be built with tools & libraries in the Ubuntu archive. Apps may bundle additional libraries they depend on, but may not include new versions of already packaged libraries.