The words righting, writing sound the same but have different meanings and spellings. Why do righting, writing sound the same even though they are completely different words?
The answer is simple: righting, writing are homophones of the English language.
A just or legal claim or title.
A stockholder's privilege of buying additional stock in a corporation at a special price, usually at par or at a price below the current market value.
The negotiable certificate on which this privilege is indicated.
Conforming with or conformable to justice, law, or morality: do the right thing and confess.
The act of one who writes.
Written form: Put it in writing.
Handwriting; penmanship.
Something written, especially:
Definitions from The American Heritage® Dictionary of the English Language, 4th Edition and Wordnik.
Homophones (literally "same sound") are usually defined as words that share the same pronunciation, regardless of how they are spelled.
If they are spelled the same then they are also homographs (and homonyms); if they are spelled differently then they are also heterographs (literally "different writing").