What happens if I figured out a solution for my bounty by my own and write a good answer. Do My reputation points belong to me again in this case?
No. Bounty means "get more attention" not "get a sure answer". You throw your money to the guild to see if they can solve your problem, the guild can try but isn't secure. You only paid so you could get the attention, not so your problem gets solved.
Sometimes your bounty can go back to you in upvotes to your answer (ie, you placed a 50 rep bounty, got yourself answered and 5 users upvoted your answer), but is not always that happens nor obligatory for anyone doing you the favor.