If a person in general is required to do a complete task A or a bussiness is required to provide a service to its customers under the law . There is no specific law being refered to but all this is general . If the person or business is unable to comply because of lack of funds or inability or lack of skill to perform the test given or the task A will they be punished ? Assume they caused no serious harm in the process and the punishment included imprisonment and fine ..
The general rule is that you must comply with all laws. The first thing that means is that you are required to know what the law is, thus ignorance of the law is not a defense for not complying. There are some special circumstances regarding notice, so a law must have been published. Second, whatever the law requires you to do, you have to do it, regardless of any difficulty you might encounter (e.g. you have to pay your taxes even if you don't have enough money).
Suppose that a law is so onerous that it is literally impossible to obey it: you still have to obey the law. You have to file a lawsuit against the government challenging the constitutionality of the law, to get the law overturned. Frequently, more requirements are imposed on businesses than on individuals, but there is no legal difference between impositions on individuals and impositions on businesses in terms of laws being difficult to comply with.
That is going to depend very much on the law in question, and so some specifics will be needed for a useful answer. Many laws impose requirements on particular types of businesses. If a business cannot comply, it may well be required to cease operations or operations of a particular type.
For example, a restaurant must comply with a whole set of health and safety regulations. If it will not or cannot, it will be closed. A hospital must comply with a huge set of requirements, including the sizes of patient rooms and the width of its corridors, as well as the number of licensed physicians and nurses that must be on duty, and many other things. Noncompliance can lead to it being closed by the government.
There are not so many laws imposing "tasks" on individuals. Most laws require people to refrain from doing things, such as stealing, attacking others, and killing others.
Paying taxes is one positive act required of individuals in many cases, and a person who refuses is often found guilty of a crime. A person without money to pay taxes owed may have property seized.
A person who does not maintain property to locally required standards may be charged for the cost of doing so, and fined in addition. In some cases the property might be seized.
A person who does not properly support his or her children may have property seized for this purpose. At one time such a person might have been imprisoned.