Your question title, and descriptions, don't seem to match up to a single phrase in English. Other people are answering as if you mean "someone who is normally capable, who has agreed to do a job but lacks the experience and knowledge to do the job properly - or who could do it if they prepared, but did not prepare and are now making it up as they go along, ad-hoc".
I think there's a chance you're asking something else:
"být (úplně) mimo" which literally translated means: "to be (completely) out/outside/away".
In British English, we say someone is "away with the faeries" (or fairies). It can mean they are daydreaming and not paying attention (staring out the window with a fixed gaze), or that they tend to say things completely disconnected from the world everyone else sees ("the cows in that field always stop talking when I go near") - as if they are living in a fantasy land. Not "insane", but "a bit delusional".
Similar phrases with similar usage: he/she "has their head in the clouds", "lives in a world of their own", "lives in cloud-cuckoo land". Someone who is intoxicated might be "out of it".
These fit your description "the mind of the person is away from the real world or that his thoughts are moving in areas different to ones where they are supposed to be", maybe also someone who is intoxicated, and someone who 'doesn't completely know what they are doing' all the time, but not a usually capable person who 'doesn't completely know what they are doing on a specific task'. But they don't fit someone being inadequately prepared, or incompetent.
They could apply to your use "someone wrote an article about certain subject while knowing too little about it" - if the article was totally nonsense.
e.g. "Did you see that article in the paper about how global warming will collapse the economy because hot weather will attract immigrants who won't buy tea and biscuits? The author is away with the faeries".
but not "the article about a business owner who bought out another company, but he did not have the accounting experience necessary to run a much bigger company and cash-flow problems forced the company out of business". This guy isn't daft, nor is he making it up as he goes along, he is out of his depth.