The formal object is a virtual object, which replaces the position of the actual object to emphasize the action of the predicate verb. It usually appears after some verbs, such as feeling, thinking, believing and considering. For example:
I think honesty is very important. I think honesty is very important. )
He found it difficult to answer this question. )
The formal subject is a virtual subject, which replaces the position of the actual subject and is used to emphasize the action in the clause. It usually appears in some structures, such as it is+ adjective +that, you /are, etc. For example:
It is important that you arrive on time. )
There is no doubt that he is the best candidate. )
So the difference between formal object and formal subject is that formal object replaces the position of actual object, while formal subject replaces the position of actual subject.