well to answer your first question, sometimes it is a hell of alot easier for a girl to just give you her number and never meet with you again, then it is to outright reject you (at least to them anyways), and they just pretend like they are interested in person to not hurt your feelings,
girls have trouble hurting a guy's ego usually, and most of them love attention,
not much you can do to stop this besides be more awesome and better looking, and more her type,
you can not ''make a girl hangout with you'' unless you kidnap her but you can mitigate yourself from getting numbers from flaky girls that are not interested and a waste of time here are some ways to avoid this, (not all of them are necessary just ideas)
1)try to escalate to the point of a kiss before getting the number to at least know she is somewhat interested (better to get a no, then a waste of time)
or simply have sex with her first time you meet her, without a bridge and gap in time spent together, she can't flake if you are already together, and if she already had sex with you, she will be fairly invested in you and a flake would be less likely
2)instead of just asking for phone number, ask for a date, phone number will just naturally come as a result if she agrees
3)make sure to put your number in her phone as well
4)after the third flake, stop going to her and wasting your time on her, let her come to you
5)before getting the number screen her for flakiness with some sort of qualifier to make her verbalize that she is not like that so you can bring it up later if she flakes and tease her
e.g. You're not one of those flaky kind of girls that never comes to anything on time, or cancels at the last minute are you?
on a scale of one to ten, what are the chances you are going to show up for this coffee on tuesday? (anything less then 10 bust on her, and do a takeaway, see if she changes her answer and qualifies)
naw, actually I can't take your number, you wont even remember me, I could only take your number if you will remember me
and so on and so on, you get the idea, some sort of investment from her that she wants you to have her number, or that she will meet up with you
if she is into you, and flaking there are real reasons for why she could possibly not want to meet you, girls are real people man, and they have real lives and are sometimes really busy, it can be that or she just needs some good comforting to get to know you and feel comfortable with you (it is way way way better to do this in person, if she gets too used to you on the phone but is not comfortable in person this could actually lessen your chance of a meet and strengthen the chance of a phone buddy but depends on girl so you are sort of trapped in a paradox)
finally how you ask a girl to hang out with you is really not all too too important, but as a general rule I would say it is better to either just tell them, or to say you're going somewhere that would be fun regardless if they came, but they can come along too (the more of a command it is the more tension is on them to say no)
e.g. Hey come hang out with me, I want to see you
or
Hey, Im going to xyz tonight, you're welcome to come, it is going to be awesome!
GOOD LUCK