We have to apply principle of homogeneity to solve this problem. Principle of homogeneity states that in a correct equation, the dimensions of each term added or subtracted must be same, i.e., dimensions of $$LHS$$ and $$RHS$$ should be equal.
According to the problem
$$y=A\, sin(\omega t-kx)$$
Here, $$y=[L]$$ hence
$$A\, sin (\omega t-kx)=[L]$$
Here,$$A=[L]$$,which peak value of y
So,$$\omega t-kx$$ should be dimensionless.
i) $$[\omega t]$$=constant
$$\Rightarrow [\omega]=[T^{-1}]$$
ii) $$[kx]$$=constant
$$\Rightarrow [k]=[L^{-1}]$$