This diploma thesis deals with the determination of an optimal tax policy applied to two companies, whereby one company is assumed to be more risk-friendly compared to the other. In order to maximize the probability that both companies survive forever, the more risk-friendly company benefits from state support until its wealth reaches a threshold. The goal is to evaluate the optimal theshold function of the wealth. The two dimensional ruin problem can be rewritten into two partial differential equations using control theory, whereby the boundary value corresponds to the unknown threshold function. Analytically, an implicit representation of the threshold function is derived by a Fredholm equation of first kind. With the purpurse of achieving an explicit representation, the numerical Legendre Wavelet Collocation method has been adapted in this work, so it can be applied to this specific Fredholm equation of first kind. The result is an explicit theshold function, calculated in MATLAB on the basis of this method.