Firstly, the first question in active voice is already grammatically incorrect to start off with since the correct verb to use with ‘mistake’ should be ‘make’ instead of ‘do’. Link to video explaining the use of verbs with ‘mistake’. There is a transcript provided in the description of the video.
That aside, your conversion of the sentence into passive voice is grammatically correct but sounds stilted. I would recommend asking “Who was this mistake made by?” instead.
The second question is unable to be converted into passive voice. Link to a question regarding active and passive voice here on ELL. According to the accepted answer, sentences can only be converted into passive voice when transitive verbs (ones with objects) are present. It would commonly have the structure ‘X [verb] Y’. Transitive verbs are not present in your second sentence so it is not able to be converted into a passive voice sentence.
Here’s a handy trick to use when you’re confused about whether a question contains a transitive verb - Answer the question yourself.
For example, the answer to your first question could be “This person made this mistake.” In that sentence, ‘[t]his person’ is the ‘X’ or the subject and ‘mistake’ is the ‘Y’ or object. ‘[M]ade’ is the verb. You can visit this website if you have trouble identifying the subject and object in sentences.
In your second sentence however, if you try to answer the question yourself, you would probably get something along the lines of ‘This happened [time].’ In that case, ‘happened’ is the verb, ‘[t]his’ is the subject’, but there is no object. Therefore that question cannot be converted into a passive voice question.
Lastly, to answer your final question, that structure with ‘by’ definitely does not apply to all question forms. You would have to determine which structure to use on a case-by-case basis after determining whether the question can even be converted into passive voice from active voice.
This is a website that has examples of questions being converted from active to passive voice.