Answering your own question is allowed and encouraged. You should, however, try to make it a high quality answer. You can go to the Help Center for details on how that's done.
See It’s OK to Ask and Answer Your Own Questions, by Jeff Atwood ♦ (co-founder of Stackexchange).