I think this is a case of what comes first, the chicken or the egg

If I understand correctly, PublicVariable needs LastRow1 and LastRow2 to to complete the string in sub1. However, the value of LastRow1 and LastRow2 is derived from sub2, which comes after the fact. Well, see if this one works for you.

[VBA]
Public PublicVariable1 As String, PublicVariable2 As String
Sub sample1()
PublicVariable1 = "=(35*(5-H"
PublicVariable2 = "))-H"
Call sample2
End Sub
Sub sample2()
Dim LastRow2 As Integer
Dim LastRow1 As Integer
' Get actual value
LastRow2 = 10
LastRow1 = 2
Cells(2, 10).Formula = PublicVariable1 & LastRow2 & PublicVariable2 & LastRow1
End Sub
[/VBA]