How to have one installation at blog.example.com and multiple blogs in sub folders such as blog.example.com/userA?

What you are looking for is a WordPress network, aka WP Multi-Site. This is perfectly suited for what you have described.

You will want to pay careful attention to the type of multi-site you setup:
http://codex.wordpress.org/Before_You_Create_A_Network#Types_of_multisite_network

Generally, the choice is between subdomain or subfolder for the type but you actually want subfolder, on your subdomain. This will give you the domain structure you want.

You will also be able to allow your individual blog owners to add their own external domain which can resolve directly to their blog.example.com/folder loation. This is easily accomplish with MU Domain Mapping: https://wordpress.org/plugins/wordpress-mu-domain-mapping/